无法在ubuntu 16.04 python 2.7.12上安装pycurl == 7.19.0

时间:2016-09-16 12:46:21

标签: python pycurl

Ubuntu - 16.04 Python - 2.7.12

大家好,我正在尝试从setup.py安装pycurl == 7.19.0,但抓住这个堆栈跟踪:

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

有谁知道什么是错的?

3 个答案:

答案 0 :(得分:1)

这些行:

#DEFINE

表示图书馆/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 idnrtmpgssapi_krb5krb5k5cryptocom_err和{无法找到{1}},这很可能意味着它们未安装。我检查了lber的依赖关系,它直接取决于ldap(取决于libcurl3gssapi-krb5-2),krb5-3k5crypto3,{ {1}},idn11

因此,安装ldap可以解决您的问题:

rtmp1

安装完毕后,再次尝试安装 pycurl

答案 1 :(得分:0)

我不知道,我尝试了一切,我认为我有pip安装的问题,我通常使用sudo pip install ....所以也许有些库没有读取权限。我用空的ubuntu恢复了快照并再次安装了所有库,没有'SUDO'pip install,而且所有答案都很多。

答案 2 :(得分:-1)

尝试:sudo apt-get install python-dev