There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/usr/lib64/python2.6/site-packages/pycurl.so: undefined symbol: CRYPTO_set_locking_callback
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.6.6 (r266:84292, Aug 18 2016, 15:13:37)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]
If you cannot solve this problem yourself, please go to
the yum faq at:
There is probably many python versions on your system and only one of them has the yum library installed. For some reason the python binary called when you run yum on the command line is not the one who has the yum library installed.
Find the list of python 2 binaries available on your system. Run as root:
[[email protected] custombuild]# find / -type f -executable -name 'python2*'
The output will probably look like that:
For each one of these, run:
You will get a python prompt. Run:
>>> import yum
Do this for every python binary until you find one that doesn’t raise an ImportError at this step.
Then find out what is the path that yum is using to run python. This is the first line in the yum script. Run
cat `which yum` | head -1
You’ll probably get:
Now, run as root:
ln -s /usr/bin/python2.x /usr/bin/python
(replace python2.x with the good python version you found earlier).
If you would need to re-build pycurl:
mv /usr/lib64/python2.6/site-packages/pycurl.so /usr/lib64/python2.6/site-packages/pycurl.so_back rpm -ihv http://mirror.centos.org/centos/6/os/x86_64/Packages/python-devel-2.6.6-66.el6_8.x86_64.rpm wget https://dl.bintray.com/pycurl/pycurl/pycurl-188.8.131.52.tar.gz tar xzf pycurl-184.108.40.206.tar.gz cd pycurl-220.127.116.11 python setup.py build --curl-config=/usr/local/bin/curl-config cp -p build/lib.linux-x86_64-2.6/pycurl.so /usr/lib64/python2.6/site-packages/pycurl.so