Knowledge Base:SELinux module not found during emerge

From Gentoo Wiki
Jump to: navigation, search

Synopsis

During any emerge operation, Portage bails out with the following error:

root #emerge ...
!!! SELinux module not found. Please verify that it was installed.

Environment

This article is applicable to Gentoo Linux installations using a selinux profile:

root #eselect profile show
Current /etc/make.profile symlink:
  hardened/linux/amd64/selinux

Analysis

This indicates that the Portage SELinux module is missing or damaged. Recent Portage versions provide this module out-of-the-box, but the security contexts of the necessary files might be wrong on the system.

Resolution

Relabel the files offered by the Portage package:

root #rlpkg portage