Call me hardcore, but yes I ran a crazy command:
The effect was I lost my python2.6 and all applications that depend on that, including emerge. After a careful examination, I found out that I had 2 Python versions installed: python2.7 and python3.1.
Here’s what I do to fix this:
- Rename the
/usr/bin/python2.old. This is because both of them is actually a symlink to
/usr/bin/python-wrapperthat select non-existent python2.6.
mv /usr/bin/python /usr/bin/python.old mv /usr/bin/python2 /usr/bin/python2.old
- Make a symlink from python2.7 to python and python2.
ln -s /usr/bin/python2.7 /usr/bin/python ln -s /usr/bin/python2.7 /usr/bin/python2
- Then, do eselect to select one of the available python. I’m a hardcore, I select the pyhon3.1: (you may choose python2.7 for the safest bet)
eselect python set python2.7
- Build your packages accordingly.
When I said Python3 is hardcore, it IS a hardcore choice. Many packages failed to build using this thing. So, please, don’t use it if you don’t want to run into deep trouble.
Many sane solutions other than this solution can be read from this thread: http://forums.gentoo.org/viewtopic-t-786104-postdays-0-postorder-asc-start-25.html