Knowledge Base:Accepting a keyword for a single package
During installation of a package, Portage complains that the package can only be installed if a keyword change is made:
emerge --ask dev-perl/Term-Screen
[ebuild N ~] dev-perl/Term-Screen-1.30.0 The following keyword changes are necessary to proceed: #required by Term-Screen (argument) =dev-perl/Term-Screen-1.30.0 ~amd64
Any Gentoo Linux environment.
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 ~amd64 since the system on which the example is tried is an amd64 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 value to override.
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.
Re-running the command with
--autounmask=y --autounmask-write automatically queues the required text file alteration:
emerge --ask --autounmask=y --autounmask-write dev-perl/Term-Screen
As with all conf files, the final update is made by running dispatch-conf (or alternatively etc-update):
Examine the diff output, press q to exit the pager (if commands at the end), and then u for
use-new to accept the alterations.
Re-run the emerge one last time:
emerge --ask dev-perl/Term-Screen
Using traditional files
Create the /etc/portage directory if it does not exist yet:
mkdir --parents /etc/portage
Add the required line:
echo "=dev-perl/Term-Screen-1.30.0 ~amd64" >> /etc/portage/package.accept_keywords
Create the /etc/portage/package.accept_keywords directory if it does not exist yet:
mkdir --parents /etc/portage/package.accept_keywords
Next, create a file in to tell Portage which ebuilds to accept for installation. For instance, if you want to install Term-ScreenColor but Term-Screen fails, create a file named Term-ScreenColor (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:
echo "=dev-perl/Term-Screen-1.30.0 ~amd64" >> /etc/portage/package.accept_keywords/Term-ScreenColor
To also let in
-r# package revisions which may contain immediately beneficial updates, replace the leading
= (equals sign) with a
The keyword itself can usually be omitted:
To always install the latest testing version, drop the leading
~ as well as the version at the end:
If the mask is because no KEYWORDS are defined, use the
- ACCEPT_KEYWORDS — The ACCEPT_KEYWORDS variable informs the package manager which ebuilds' KEYWORDS values it is allowed to accept.
- KEYWORDS — the KEYWORDS variable informs in which architectures the ebuild is stable or still in testing phase.
- Knowledge Base:Accepting a keyword for all packages