Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 285024

Summary: emerge pyopenssl fails with "illegal installation into /usr/local"
Product: Gentoo Linux Reporter: clayton <craftyguy>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: VERIFIED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build log
enviroment
still not merging

Description clayton 2009-09-14 23:44:27 UTC
'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
running install_egg_info
Writing /var/tmp/portage/dev-python/pyopenssl-0.9-r1/image/usr/local/lib64/python2.6/site-packages/pyOpenSSL-0.9-py2.6.egg-info
 *
 * 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

Reproducible: Always

Steps to Reproduce:
1.emerge =dev-python/pyopenssl-0.9
Actual Results:  
emerge fails

Expected Results:  
emerge succeeds
Comment 1 clayton 2009-09-14 23:46:31 UTC
Created attachment 204142 [details]
build log
Comment 2 clayton 2009-09-14 23:46:53 UTC
Created attachment 204143 [details]
enviroment
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-09-14 23:52:59 UTC
You manually (without using package manager) built Python.
Comment 4 clayton 2009-09-15 00:10:55 UTC
Created attachment 204150 [details]
still not merging

Actually, I have installed python using emerge, and it still fails..
Comment 5 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-09-15 00:13:21 UTC
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)'
Comment 6 clayton 2009-09-15 01:13:11 UTC
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
/usr/local/bin/python
crafty_pvr ~ # type -p python2.6
/usr/local/bin/python2.6
crafty_pvr ~ # python -c 'import sys; print(sys.prefix)'
/usr/local
crafty_pvr ~ # /usr/bin/python -c 'import sys; print(sys.prefix)'
/usr
Comment 7 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-09-15 05:44:05 UTC
(In reply to comment #6)
> crafty_pvr ~ # type -p python
> /usr/local/bin/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)'
> /usr/local
> crafty_pvr ~ # /usr/bin/python -c 'import sys; print(sys.prefix)'
> /usr

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).