'emerge =dev-python/pyopenssl-0.9' fails with "illegal installation into /usr/local"
copying build-2.6/lib.linux-x86_64-2.6/OpenSSL/__init__.py -> /var/tmp/portage/dev-python/pyopenssl-0.9-r1/image/usr/local/lib64/python2.6/site-packages/OpenSSL
* ERROR: dev-python/pyopenssl-0.9-r1 failed.
* Call stack:
* ebuild.sh, line 49: Called src_install
* environment, line 3107: Called distutils_src_install
* environment, line 815: Called die
* The specific snippet of code:
* die "Illegal installation into /usr/local";
* The die message:
* Illegal installation into /usr/local
Steps to Reproduce:
Created attachment 204142 [details]
Created attachment 204143 [details]
You manually (without using package manager) built Python.
Created attachment 204150 [details]
still not merging
Actually, I have installed python using emerge, and it still fails..
Post the output of:
type -p python
type -p python2.6
python -c 'import sys; print(sys.prefix)'
/usr/bin/python -c 'import sys; print(sys.prefix)'
These indicate that python is installed to /usr/local. I've only used portage to install/update python. There is a python binary in both /usr/bin and /usr/local/bin, and they appear to be hardlinked.
crafty_pvr ~ # type -p python
crafty_pvr ~ # type -p python2.6
crafty_pvr ~ # python -c 'import sys; print(sys.prefix)'
crafty_pvr ~ # /usr/bin/python -c 'import sys; print(sys.prefix)'
(In reply to comment #6)
> crafty_pvr ~ # type -p python
It means that the first python found in directories included in PATH variable is "/usr/local/bin/python"...
> crafty_pvr ~ # python -c 'import sys; print(sys.prefix)'
> crafty_pvr ~ # /usr/bin/python -c 'import sys; print(sys.prefix)'
The outputs of /usr/local/bin/python and /usr/bin/python are different, so these binaries aren't hardlinked. You have Python installed in both places. You should remove manually installed Python in /usr/local, so that Portage use Python installed by Portage (in /usr).