Knowledge Base:Accepting a keyword for a single package

Synopsis
During installation of a package, Portage complains that the package can only be installed if a keyword change is made:

Environment
Any Gentoo Linux environment.

Analysis
Every Gentoo ebuild (package) has a set of KEYWORDS values that are referenced when it compiles. These keywords identify for which architectures the ebuild is installable, and if the ebuild is stable (no prefix) or still in testing phase (prefixed by ).

When trying to install the package, Portage found that the only way it can honor the request (either because the specific package was asked for, or because it is being pulled in as a dependency) as if Portage was been told that it can install the ~arch version of a package. In the example above, it would be since the system on which the example is tried is an  architecture (x86_64).

In certain cases, the package is defined with no KEYWORDS content. In this specific case, Portage will suggest to use the special  keyword to override.

Resolution
This assumes that the user is comfortable with installing testing ebuilds. If this is an error (testing ebuilds are not desired but the stable ebuilds do not suffice for the installation), check with the Gentoo developers and, if necessary, open a bug report.

Using --autounmask-write
Re-running the command with  automatically queues the required text file alteration:

As with all conf files, the final update is made by running (or alternatively ):

Examine the diff output, press to exit the pager (if commands at the end), and then  for   to accept the alterations.

Finally, re-run the emerge one last time:

Using traditional files
Create the directory if it does not exist yet:

Add the required line:

Using directories
Create the directory if it does not exist yet:

Next, create a file in to tell Portage which ebuilds to accept for installation. For instance, to install Term-ScreenColor and Term-Screen fails, create a file named (this filename is used to the user has a reference as to why they deviated from the standard keywords) in which the Term-Screen deviation is placed:

Additional notes
To also let in  package revisions which may contain immediately beneficial updates, replace the leading   (equals sign) with a   (tilde):

The keyword itself can usually be omitted:

To always install the latest testing version, drop the leading  or   as well as the version at the end:

If the mask is because no KEYWORDS are defined, use the  notation: