由于this bug,我正在尝试使用OpenSSL重建pycurl。 我使用this example:
- sudo apt-get install build-essential fakeroot dpkg-dev
- mkdir~ / python-pycurl-openssl
- cd~ / python-pycurl-openssl
- sudo apt-get source python-pycurl
- sudo apt-get build-dep python-pycurl
- sudo apt-get install libcurl4-openssl-dev
- sudo dpkg-source -x pycurl_7.19.3-0ubuntu3.dsc
- cd pycurl-7.19.3
- 编辑debian / control文件并将'libcurl4-gnutls-dev'的所有实例替换为'libcurl4-openssl-dev'(7更改)
- sudo PYCURL_SSL_LIBRARY = openssl dpkg-buildpackage -rfakeroot -b
- sudo dpkg -i ../ python-pycurl_7.19.3-0ubuntu3_amd64.deb
醇>
但毕竟我仍然坚持使用GnuTLS构建的pycurl。
>>> pycurl.version
'PycURL/7.19.5.1 libcurl/7.35.0 GnuTLS/2.12.23 zlib/1.2.8 libidn/1.28 librtmp/2.3'
操作日志(有一些错误的追溯):http://pastebin.com/6hUEUGar
我用:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
我做错了什么?
我可以使用pip解决问题:
sudo pip uninstall pycurl
export PYCURL_SSL_LIBRARY=openssl
sudo pip install pycurl --upgrade
现在:
>>> pycurl.version
'PycURL/7.19.5.1 libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3'
但我不确定这是对的。为什么系统中有两个包? 或者没关系,python只与其中一个链接?