yum 命令无法使用报错

报错信息

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   /usr/lib64/python2.7/site-packages/pycurl.so: undefined symbol: CRYPTO_num_locks

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.7.5 (default, Jun 17 2014, 18:11:42) 
[GCC 4.8.2 20140120 (Red Hat 4.8.2-16)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq
  
 cat /etc/ld.so.conf
include ld.so.conf.d/*.conf

一开始import pycurl 报错,按如下链接改错
https://my.oschina.net/crazyh...
结果yum就不能用,删掉usr/lib64/libcurl.so.4依旧报错

阅读 6.1k
2 个回答

解决方法:
1.rpm 安装python-devel http://rpm.pbone.net/index.ph...
2.重新编译pycurl
发现报另一个错

pycurl: libcurl link-time ssl backend (none/other) is different from compile-time ssl backend (openssl)
export PYCURL_SSL_LIBRARY=nss 
sudo     pip install --compile pycurl

系统默认Python版本改成Python2.7了?
vim /usr/bin/yum
第一行导入python改成python2.6 试试

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题