简体   繁体   中英

Can't install pycurl==7.19.0 on ubuntu 16.04 python 2.7.12

Ubuntu - 16.04 Python - 2.7.12

Hi guys, I'm trying install pycurl==7.19.0 from setup.py, but catch this stack trace:

Downloading https://pypi.python.org/packages/11/73/abcfbbb6e1dd7087fa53042c301c056c11264e8a737a4688f834162d731e/pycurl-7.19.0.tar.gz#md5=074cd44079bb68697f5d8751102b384b
Best match: pycurl 7.19.0
Processing pycurl-7.19.0.tar.gz
Writing /tmp/easy_install-F8gcvD/pycurl-7.19.0/setup.cfg
Running pycurl-7.19.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-F8gcvD/pycurl-7.19.0/egg-dist-tmp-8sbXeG
Using curl-config (libcurl 7.47.0)
src/pycurl.c: In function ‘multi_socket_callback’:
src/pycurl.c:2351:9: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
     int ret;
         ^
src/pycurl.c: In function ‘initpycurl’:
src/pycurl.c:3453:31: warning: macro "__DATE__" might prevent reproducible builds [-Wdate-time]
     insstr(d, "COMPILE_DATE", __DATE__ " " __TIME__);
                               ^
src/pycurl.c:3453:44: warning: macro "__TIME__" might prevent reproducible builds [-Wdate-time]
     insstr(d, "COMPILE_DATE", __DATE__ " " __TIME__);
                                            ^
/usr/bin/ld: cannot find -lidn
/usr/bin/ld: cannot find -lrtmp
/usr/bin/ld: cannot find -lgssapi_krb5
/usr/bin/ld: cannot find -lkrb5
/usr/bin/ld: cannot find -lk5crypto
/usr/bin/ld: cannot find -lcom_err
/usr/bin/ld: cannot find -llber
/usr/bin/ld: cannot find -llber
/usr/bin/ld: cannot find -lldap
collect2: error: ld returned 1 exit status
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Does anyone known what's wrong?

These lines:

/usr/bin/ld: cannot find -lidn
/usr/bin/ld: cannot find -lrtmp
/usr/bin/ld: cannot find -lgssapi_krb5
/usr/bin/ld: cannot find -lkrb5
/usr/bin/ld: cannot find -lk5crypto
/usr/bin/ld: cannot find -lcom_err
/usr/bin/ld: cannot find -llber
/usr/bin/ld: cannot find -llber
/usr/bin/ld: cannot find -lldap

Mean the libraries idn , rtmp , gssapi_krb5 , krb5 , k5crypto , com_err , lber , and ldap could not be found which most likely means they are not installed. I checked the dependencies of libcurl3 and it directly depends on gssapi-krb5-2 (which depends on krb5-3 and k5crypto3 ), idn11 , ldap , rtmp1 , ssl1 .

So, installing libcurl3 should solve your problem:

sudo apt-get install libcurl3

After that's installed, try installing pycurl again.

I don't know, i tried everything, i think that i had problem with pip install, i usually use sudo pip install.... so maybe some libraries don't have permissions to read. I restored snapshot with empty ubuntu and install all libraries again, without 'SUDO' pip install, thanx a lot for all answers.

尝试: sudo apt-get install python-dev

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM