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

来源:互联网 发布:linux密码忘了 编辑:程序博客网 时间:2024/06/06 11:46

今天在linux机器上执行yum指令时报“pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (none/other)”找个错误,提示pycurl不存在。既然不存在,那就安装呗。使用

pip install pycurl安装过程报错,提示缺少某些模块,具体如下

src/module.c: In function initpycurl’:       src/module.c:723: error: CURLPROTO_IMAP undeclared (first use in this function)       src/module.c:723: error: (Each undeclared identifier is reported only once       src/module.c:723: error: for each function it appears in.)       src/module.c:724: error: CURLPROTO_IMAPS undeclared (first use in this function)       src/module.c:725: error: CURLPROTO_POP3 undeclared (first use in this function)       src/module.c:726: error: CURLPROTO_POP3S undeclared (first use in this function)       src/module.c:727: error: CURLPROTO_SMTP undeclared (first use in this function)       src/module.c:728: error: CURLPROTO_SMTPS undeclared (first use in this function)       src/module.c:729: error: CURLPROTO_RTSP undeclared (first use in this function)       src/module.c:730: error: CURLPROTO_RTMP undeclared (first use in this function)       src/module.c:731: error: CURLPROTO_RTMPT undeclared (first use in this function)       src/module.c:732: error: CURLPROTO_RTMPE undeclared (first use in this function)       src/module.c:733: error: CURLPROTO_RTMPTE undeclared (first use in this function)       src/module.c:734: error: CURLPROTO_RTMPS undeclared (first use in this function)       src/module.c:735: error: CURLPROTO_RTMPTS undeclared (first use in thi

本人参考http://stackoverflow.com/questions/26405389/failed-to-install-pycurl-on-heroku来解决

pip install pycurl==7.19.3.1提示安装成功,但是在使用

import pycurl时还是报错,于是本人下载了libcurl库,下载链接:http://curl.haxx.se/download.html

下载后解压,.然后

/configure

make

之后还是报错,搜索后,找到了解决方案,按照这里介绍http://curl.haxx.se/mail/lib-2008-06/0331.html,Just build it with NSS instead of OpenSSL:配置时加上参数

 $ ./configure --without-ssl --with-nss 这样就完美的解决了

0 0