鍍金池/ 問答/Linux/ yum 命令無法使用報錯

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依舊報錯

回答
編輯回答
溫衫

系統(tǒng)默認Python版本改成Python2.7了?
vim /usr/bin/yum
第一行導入python改成python2.6 試試

2017年11月27日 05:26
編輯回答
夢若殤

解決方法:
1.rpm 安裝python-devel http://rpm.pbone.net/index.ph...
2.重新編譯pycurl
發(fā)現報另一個錯

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
2017年7月21日 17:27