1

So:

linux: Linux 4.5.4-1-ARCH x86_64 GNU/Linux
python: Python 2.7.11
libcurl-gnutls installed

I want to change pycurl backend from openssl to gnutls.

export PYCURL_SSL_LIBRARY=gnutls
pip install --compile pycurl

It's compiling and installing pycurl with gnutls just perfect. But when i try to import pycurl getting this:

>>> import pycurl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (gnutls)

I also tried to do:

export LD_PRELOAD=/usr/lib/libcurl-gnutls.so.4
export PYCURL_SSL_LIBRARY=gnutls
pip install --compile pycurl

Then i get this:

>>> import pycurl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /usr/lib/libcurl-gnutls.so.4: version `CURL_OPENSSL_4' not found (required by /usr/lib/python2.7/site-packages/pycurl.so)

How to fix this? Btw it works with openssl backend, but i need gnutls.

Bidlocoder
  • 101
  • 1
  • 2
  • Just an idea (I may be wrong here): With verbose pip output (`pip2 -v install --compile libcurl`) it shows that gcc compiles with `-DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_SSL=1` (at least for me); should that not read `-DHAVE_CURL_GNUTLS=1` instead? That would mean that pip2 does not interpret the PYCURL_SSL_LIBRARY environment variable correctly. – 0range May 23 '16 at 18:51

0 Answers0