ImportError: pycurl: libcurl link-time version (7.19.7) is older than compil

pycurl has requirements for libcurl version, you need to upgrade curl first and


download curl
wget http://curl.haxx.se/download/curl-7.21.3.tar.gz
tar xzvf curl-7.21.3.tar.gz
cd curl-7.21 .3
./configure #If you install pycurl after the specified path, you also need to specify the curl-config path, point to the file
make
make install to


download pycurl
wget http://pycurl.sourceforge.net/download/pycurl-7.19.0.tar. gz
tar xzvf pycurl-7.19.0.tar.gz
cd pycurl-7.19.0
python setup.py install


everything goes well, no error is prompted, but after running python, there is a problem

import pycurl


prompts the following error

Traceback (most recent call last):
File "", line 1, in ?
ImportError: No module named pycurl



Check it, it turns out that the curl path assumed by pycurl itself is incorrect.
You need to specify the curl-config path to pycurl as follows:

python setup.py install –curl-config=/usr/local/bin/curl-config






相关报错:


Traceback (most recent call last):
  File "", line 1, in
ImportError: libcurl.so.4: cannot open shared object file: No such file or directory
或者
Traceback (most recent call last):
  File "", line 1, in
ImportError: pycurl: libcurl link-time version (7.19.7) is older than compile-time version (7.37.0)


提示错误,解决方法:

export LD_LIBRARY_PATH=/usr/local/lib


or

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326882647&siteId=291194637