Fix python3 after installing Pycurl in import pycurl times error
- 2020-12-13 19:00:22
- OfStack
The problem this time is in import pycurl times wrong
pycurl:libcurl link-time version is older than compile-time version
I have read a lot of explanations and methods on the Internet, but I haven't solved and analyzed this problem well. Let me tell you my own process first
1. Installation of centos7, es11EN2.7 is the default installation, and python3 is later installed using src. Similarly, the package of curl-7.61 and pycurl-7.43 should be the latest
2, make first & & make install installed curl-7.61, went to /usr/local, then python3 setup.ES28en install installed pycurl-7.43
3, in Import pycurl times wrong as above error
Solution process:
Have checked all kinds of methods on the Internet, have tried and failed to solve the problem, so calm down to carefully read the error content pycurl:libcurl ES41en-ES42en is older than ES47en-ES48en version
English 1 is normal, so I read that the version of the libcurl connection is older than the current compiled version, so I compared the contents of the following two folders
Under/usr lib ll libcur *
and
Under/usr/local/lib ll libcurl *
The contents are as follows
libcurl.so.4-
>
libcurl.so.4.3.0
libcurl.so.4.3.0
and
libcurl.a
libcurl.la
libcurl.so-
>
libcurl.so.4.5.0
libcurl.so.4-
>
libcurl.so.4.5.0
licburl.4.5.0
Then I wonder if it is caused by using libcurl.4.3.0 under /usr/lib when installing pycurl, so first
pip3 uninstall pycurl unloaded pycurl
And then make again & & make install curl-7.61
Then enter /usr/lib to libcurl. so. 4- > libcurl.so.4.3.0
Delete is then created with ln-ES123en
libcurl.so- > /usr/local/lib/libcurl.so.4.5.0
libcurl.so.4- > /usr/local/lib/libcurl.so.4.5
Then python3 setup. py install pycurl
Enter python3 again, import pycurl is normal, so let's summarize
This is probably the result of using an old library when installing pycurl