Gentoo emerge Doesn’t Do Anything!

By | May 15, 2011

After performing maintenance on my gentoo linux system, emerge no longer did anything.  Any emerge command would immediately return with no output or result.  This happened to be just after I had run revdep-rebuild.  Revdep-rebuild removed python 2.6 which I didn’t think was a problem because I had just updated python and 2.6 is an old version anyway.  emerge is actually a python script so removing python 2.6 was the source of my problem.  It took me a few minutes and a few fruitless google searches to realize this which is why I am writing about it now.

It turns out that while I had indeed installed both python 2.7 and python 3.1 I had not selected them as the “current version” to be used by the system.  To get a list of the installed versions of python, use:

eselect python list

The currently active version will have an asterisk by it.  My list didn’t have any asterisks. To select the version you want to use, do:

eselect python set [#]

where [#] is replaced by the list number of the version you want to use.  You’ll probably want to set this to the highest installed version which at the time of this writing is 3.1.

It turns out that gentoo will allow you to set an active version of both python 2 and python 3 presumably because some packages won’t work with python 3.  So, make sure to set your python 2 version as well.  To get the list of python 2 versions do:

eselect python list --python2

To set the python 2 version, do:

eselect python set --python2 [#]

Where [#] is the list number of the python 2 version you want to use. At the time of this writing, the highest python 2 version is 2.7

You’ll then want to run python-updater to update all the packages dependent on python to use the new version.

If emerge still doesn’t work, you have another problem.  Let me know how you solved it.