[Bug 1111673] Re: pycurl built with gnutls not working as openssl (error: gnutls_handshake() failed)

parq 1111673 at bugs.launchpad.net
Fri Jun 27 08:44:13 UTC 2014


Hi,

I've tried it in Ubuntu 14.04 64bit AMD, but I've an error. In this
case, the pycurl package is python-pycurl_7.19.3-0ubuntu3_amd64.deb

Updated workaround:
1. sudo apt-get install build-essential fakeroot dpkg-dev
2. mkdir ~/python-pycurl-openssl
3. cd ~/python-pycurl-openssl
4. sudo apt-get source 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. edit debian/control file and replace all instances of “libcurl4-gnutls-dev” with “libcurl4-openssl-dev” (7 changes)
10. sudo dpkg-buildpackage -rfakeroot -b
11. sudo dpkg -i ../python-pycurl_7.19.3-0ubuntu3_amd64.deb

During the step 10 I've got this error:

ERROR

======================================================================
ERROR: test suite for <module 'tests' from '/home/parq/python-pycurl-openssl/pycurl-7.19.3/tests/__init__.py'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/suite.py", line 208, in run
    self.setUp()
  File "/usr/lib/python2.7/dist-packages/nose/suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "/usr/lib/python2.7/dist-packages/nose/suite.py", line 314, in setupContext
    try_run(context, names)
  File "/usr/lib/python2.7/dist-packages/nose/util.py", line 471, in try_run
    return func()
  File "/home/parq/python-pycurl-openssl/pycurl-7.19.3/tests/__init__.py", line 6, in setup_package
    import pycurl
ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (gnutls)

----------------------------------------------------------------------
Ran 0 tests in 0.063s


The package is created anyway and can be installed. But when I test it in python (pycurl.version) I got the same error:

Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 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)
>>> 

Any idea?

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to pycurl in Ubuntu.
https://bugs.launchpad.net/bugs/1111673

Title:
  pycurl built with gnutls not working as openssl (error:
  gnutls_handshake() failed)

Status in “pycurl” package in Ubuntu:
  Confirmed

Bug description:
  A call to that lib returns problem in gnutls_handshake(). The problem
  is that pycurl was built with gnutls. Building it with openssl the
  problem disappear. Below there is a 'how to' to build with openssl,
  replacing some calls to gnutls with calls to openssl.

  Details:

  I'm trying to use 'git' and a server set up with apache+SSL. When I
  try to clone a repository I get the following error:

  Cloning into 'test.git'...
  error: gnutls_handshake() failed: A TLS warning alert has been received. while accessing https://<my server>/test.git/info/refs
  fatal: HTTP request failed

  Looking for some information I've found this bug on Debian:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=515200

  And, looking a bit more, I've found a solution that works for me:

  https://code.google.com/p/wfuzz/wiki/PyCurlSSLBug

  Is it possible to have a different version of python-pycurl compiled
  with openssl?

  Thanks!

  ProblemType: Bug
  DistroRelease: Ubuntu 12.10
  Package: python-pycurl 7.19.0-5ubuntu1
  ProcVersionSignature: Ubuntu 3.5.0-22.34-generic 3.5.7.2
  Uname: Linux 3.5.0-22-generic x86_64
  ApportVersion: 2.6.1-0ubuntu10
  Architecture: amd64
  Date: Thu Jan 31 15:53:40 2013
  InstallationDate: Installed on 2012-12-03 (59 days ago)
  InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
  MarkForUpload: True
  SourcePackage: pycurl
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pycurl/+bug/1111673/+subscriptions



More information about the foundations-bugs mailing list