Knowledge Base:Portage fails to label files because setfiles does not work anymore

Synopsis
When trying to (re)install software, Portage breaks during the Setting SELinux security labels phase. The below error message is an example:

Environment
This article applies to Gentoo Linux installations with a selinux profile:

Analysis
If for some reason no longer works, any install activity performed by Portage will fail since it calls during each installation. Rebuilding thus fails.

Resolution
Rebuild but temporarily disable SELinux support:

Then, run to fix the labels of the package: