Description of problem: Trying to use yum now results in the following message: """ There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: /usr/lib/python2.5/lib-dynload/cPickle.so: undefined symbol: PyUnicodeUCS4_DecodeRawUnicodeEscape Please install a package which provides this module, or verify that the module is installed correctly. It's possible that the above module doesn't match the current version of Python, which is: 2.5 (trunk, Nov 28 2007, 11:58:41) [GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] If you cannot solve this problem yourself, please go to the yum faq at: http://wiki.linux.duke.edu/YumFaq """ Last-installed packages should be listed in attachment (output of "rpm -qa --last") How reproducible: Every time Steps to Reproduce: 1. Run any yum command, e.g. 'yum' or 'yum list' Additional info: Running python from command line and trying to import cPickle results in same error. Custom version of Python 2.5 is installed into /usr/local/ - but using executable extension option (which names the executable "python.foobar" instead of "python"). Running custom version of python and importing cPickle works correctly (no error is displayed). P.S. not sure which package to file against, filing against yum for now.
Created attachment 273441 [details] List of last several packages that have been installed
right - your custom python version is polluting the library module paths for the system python. try this python -c "import sys; print sys.path"
[root@mireille ~]# python -c "import sys; print sys.path" ['', '/usr/lib/python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/Numeric', '/usr/lib/python2.5/site-packages/PIL', '/usr/lib/python2.5/site-packages/gst-0.10', '/usr/lib/python2.5/site-packages/gtk-2.0'] By the way, that doesn't change even if I explicitly set LD_LIBRARY_PATH=/usr/local/lib. Someone suggested I reinstall python-libs, but that didn't help either :(
Update: I've discovered how to make the problem go away. Apparently, I needed to [re]move files /usr/local/lib/libpython2.5.so and /usr/local/lib/libpython2.5.so.1.0 to make the stock python work. I've checked that: * $LD_LIBRARY_PATH was not set * I was running /usr/bin/python * "import sys; print sys.path" doesn't mention any /usr/local directories * "import <some package that's only available in stock python>" works * "import <some package that's only available in custom python>" doesn't work So, it's really surprising that /usr/local/lib/libpython2.5.so would be used. Is this a bug or a "feature"?
update: found that /usr/local/lib exists in my /etc/ld.so.conf