安装一堆其它东西后, 使用 yum 后报错如下:

# yum search lsof

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

pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (none/other)

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 24 2015, 00:41:19) [GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]

If you cannot solve this problem yourself, please go to the yum faq at: http://yum.baseurl.org/wiki/Faq

搜索后解决如下:

# pip uninstall pycurl
# export PYCURL_SSL_LIBRARY=nss
# pip install pycurl

注意 highlight 行的值: nss. 此处的值需要与前面的提示相符.

pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (none/other)

此处是 nss, 那么PYCURL_SSL_LIBRARY的值就应该是 nss.

Reference:

Categories: Code

Yu

Ideals are like the stars: we never reach them, but like the mariners of the sea, we chart our course by them.

Leave a Reply

Your email address will not be published. Required fields are marked *