Binary package hint: python2.6
The libpython2.6 package (version 2.6.4-0ubuntu3) installs a broken symlink into /usr/lib/python2.6/config/libpython2.6.so. The symlink is pointing to ../../libpython2.6.so (i.e. /usr/lib/libpython2.6.so), but that file does not exist. /usr/lib/libpython2.6.so.1 does exist.
I discovered this problem by trying to run the tests for a package that uses ScriptTest (http://pypi.python.org/pypi/ScriptTest), which creates a Python virtualenv (which symlinks a small portion of /usr/lib/python2.6 into the virtualenv, for bootstrapping) and then does some kind of traversal through the virtualenv's symlinked lib/ dir, barfing on the broken symlink with the following traceback:
Traceback (most recent call last):
File "tests/test_pip.py", line 140, in <module>
main()
File "tests/test_pip.py", line 121, in main
reset_env()
File "tests/test_pip.py", line 41, in reset_env
env.run(sys.executable, '-m', 'virtualenv', '--no-site-packages', env.base_path)
File "/home/carljm/projects/pip/piptests_env/lib/python2.6/site-packages/scripttest/__init__.py", line 137, in run
files_after = self._find_files()
File "/home/carljm/projects/pip/piptests_env/lib/python2.6/site-packages/scripttest/__init__.py", line 169, in _find_files
self._find_traverse(fn, result)
File "/home/carljm/projects/pip/piptests_env/lib/python2.6/site-packages/scripttest/__init__.py", line 187, in _find_traverse
self._find_traverse(fn, result)
File "/home/carljm/projects/pip/piptests_env/lib/python2.6/site-packages/scripttest/__init__.py", line 187, in _find_traverse
self._find_traverse(fn, result)
File "/home/carljm/projects/pip/piptests_env/lib/python2.6/site-packages/scripttest/__init__.py", line 187, in _find_traverse
self._find_traverse(fn, result)
File "/home/carljm/projects/pip/piptests_env/lib/python2.6/site-packages/scripttest/__init__.py", line 189, in _find_traverse
result[path] = FoundFile(self.base_path, path)
File "/home/carljm/projects/pip/piptests_env/lib/python2.6/site-packages/scripttest/__init__.py", line 380, in __init__
self.stat = os.stat(self.full)
OSError: [Errno 2] No such file or directory: '/home/carljm/projects/pip/pip/tests/test-scratch/lib/python2.6/config/libpython2.6.so'
Successful workaround:
carljm@ arugula: ~/projects/ pip/pip$ cd /usr/lib/ arugula: /usr/lib$ sudo ln -s libpython2.6.so.1 libpython2.6.so arugula: /usr/lib$ ls -la libpython* arugula: /usr/lib$
carljm@
[sudo] password for carljm:
carljm@
lrwxrwxrwx 1 root root 17 2010-02-12 11:02 libpython2.6.so -> libpython2.6.so.1
lrwxrwxrwx 1 root root 19 2010-02-11 12:12 libpython2.6.so.1 -> libpython2.6.so.1.0
-rw-r--r-- 1 root root 2346612 2009-12-07 14:38 libpython2.6.so.1.0
carljm@