4

由于这个错误,我正在尝试使用 OpenSSL 重建 pycurl 。我用这个例子

  1. sudo apt-get install build-essential fakeroot dpkg-dev
  2. mkdir ~/python-pycurl-openssl
  3. cd ~/python-pycurl-openssl
  4. sudo apt-get 源码 python-pycurl
  5. sudo apt-get build-dep python-pycurl
  6. sudo apt-get install libcurl4-openssl-dev
  7. sudo dpkg-source -x pycurl_7.19.3-0ubuntu3.dsc
  8. cd pycurl-7.19.3
  9. 编辑 debian/control 文件并用 'libcurl4-openssl-dev' 替换所有 'libcurl4-gnutls-dev' 实例(7 处更改)
  10. sudo PYCURL_SSL_LIBRARY=openssl dpkg-buildpackage -rfakeroot -b
  11. sudo dpkg -i ../python-pycurl_7.19.3-0ubuntu3_amd64.deb

但毕竟我仍然坚持使用 pycurl 的 GnuTLS 构建。

>>> 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 只是链接到其中之一?

4

0 回答 0