fix pycurl link error
2015-08-29 14:35
330 查看
install pycurl with pip, but failed to import it, the error as follow
try
pip uninstall pycurl
export PYCURL_SSL_LIBRARY=[openssl|gnutls|nss] #错误中显示是 nss 则换成 nss
pip install pycurl
But not work.
refer the follows on http://stackoverflow.com/questions/21096436/pip-install-pycurl-ssl-backend-error
install pycurl with a source code and set a flag
(Note: the original pycurl should be remove by pip first)
done~!
p.s.
can download pycurl at https://github.com/pycurl/pycurl
another case:
run sudo pip install pycurl, and get the following error message:
Installing collected packages: pycurl Running setup.py install for
pycurl
….
building ‘pycurl’ extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCURL_VERSION=”7.19.5.1” -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_SSL=1 -I/usr/local/include/python2.7 -c src/docstrings.c -o build/temp.linux-x86_64-2.7/src/docstrings.o
在包含自 src/docstrings.c:4 的文件中:
src/pycurl.h:59:4: 错误:#error “Need libcurl version 7.19.0 or greater to compile pycurl.”
error: command ‘gcc’ failed with exit status 1
….
get a curl package with a greater version from http://curl.haxx.se/download/ and install,
then sudo pip install pycurl done! and no error when import pycurl in python
if failed to import pycurl again, note that there are more than one libcurl.so in system, find them out and check the *.so path in /etc/ld.so.conf
import pycurl ImportError: pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (none/other)
try
pip uninstall pycurl
export PYCURL_SSL_LIBRARY=[openssl|gnutls|nss] #错误中显示是 nss 则换成 nss
pip install pycurl
But not work.
refer the follows on http://stackoverflow.com/questions/21096436/pip-install-pycurl-ssl-backend-error
install pycurl with a source code and set a flag
(Note: the original pycurl should be remove by pip first)
sudo python setup.py --with-nss install
done~!
p.s.
can download pycurl at https://github.com/pycurl/pycurl
another case:
run sudo pip install pycurl, and get the following error message:
Installing collected packages: pycurl Running setup.py install for
pycurl
….
building ‘pycurl’ extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCURL_VERSION=”7.19.5.1” -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_SSL=1 -I/usr/local/include/python2.7 -c src/docstrings.c -o build/temp.linux-x86_64-2.7/src/docstrings.o
在包含自 src/docstrings.c:4 的文件中:
src/pycurl.h:59:4: 错误:#error “Need libcurl version 7.19.0 or greater to compile pycurl.”
error: command ‘gcc’ failed with exit status 1
….
get a curl package with a greater version from http://curl.haxx.se/download/ and install,
then sudo pip install pycurl done! and no error when import pycurl in python
if failed to import pycurl again, note that there are more than one libcurl.so in system, find them out and check the *.so path in /etc/ld.so.conf
相关文章推荐
- CentOS系统下的Hadoop集群(第10期)_MySQL关系数据库
- JavaScript学习笔记2-附录(JavaScript中的内置对象)
- 解决CentOS 6.5中,Python-2.7.*交互模式下方向键、退格键等出现乱码的问题
- 幻数
- jquery 鼠标 滑轮 滚动 方向
- noip2003 神经网络 (拓扑排序,深搜)
- leetcode Implement Trie (Prefix Tree)
- Activity间数据传递与版本兼容问题
- 第二讲实例变量可见度,set/get方法,自定义初始化(代码) 及description的使用
- php中$this、static、final、const、self 等几个关键字的用法
- css去除页面点击链接、按钮触发的虚线框
- Java学习笔记(2):null 和空字符串的区别
- 3维空间旋转3维空间矩阵旋转及旋转变换
- 预测的原理及其实战(2)
- java HashMap那点事
- JavaScript 面向对象继承详解
- noip2003 麦森数 (数论,高精乘单精)
- python中range函数的使用
- Libraries: Performance vs. Native JS
- CSS选择器优先级