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.

  • fers

    Thanks for this post, I just ran into the same issue and easily found your post through google. Seems like this does the trick. 🙂

    • Thanks for commenting. I’m glad it could help you solve your problem.

  • Soparla

    Good job on the post. You saved me the time of having to figure out what the problem was 🙂

    • That’s what I was hoping for. Thanks for commenting.

  • tux-fan

    I ran into the ’emerge’ problem too and could solve it with your solution. Thanks alot for your post.

    best regards
    tux-fan

    • tux-fan

      Pls insert the word ’emerge’ into the ” 🙂

    • Glad you were able to solve your problem. Thanks for the comment.