Crypt::SSLeay and Ubuntu 11.10

Update 2: If you’re seeing this error, grab the new version of Crypt::SSLeay, version 0.60 has been released which should solve this version. For more details see the blog post announcing it’s release.


If you need to install Crypt::SSLeay on Ubuntu 11.10 and it fails with errors complaining it can’t load SSLeay.so it might be RT 70565 hasn’t been patched yet.

#     Tried to use 'Net::SSL'.
#     Error:  Can't load '/home/user/.cpanm/work/1319487963.639/Crypt-SSLeay-0.58/blib/arch/auto/Crypt/SSLeay/SSLeay.so' for module Crypt::SSLeay: /home/user/.cpanm/work/1319487963.639/Crypt-SSLeay-0.58/blib/arch/auto/Crypt/SSLeay/SSLeay.so: undefined symbol: SSLv2_client_method at /home/user/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/x86_64-linux/DynaLoader.pm line 190.

Luckily there is a patch attached to the case, nossl2.patch which can be applied to make it just work.

If you’re using cpanm, run it in prompt mode and look at the errors when they occur. That will allow you to patch the module and get it working again.

$ cpanm Crypt::SSLeay --prompt
--> Working on Crypt::SSLeay
Fetching http://search.cpan.org/CPAN/authors/id/N/NA/NANIS/Crypt-SSLeay-0.58.tar.gz ... OK
Configuring Crypt-SSLeay-0.58 ... OK
Building and testing Crypt-SSLeay-0.58 ... FAIL
Testing Crypt-SSLeay-0.58 failed.
You can s)kip, r)etry, f)orce install or l)ook ? [s] l
Entering /home/user/.cpanm/work/1319488454.2107/Crypt-SSLeay-0.58 with /bin/bash
$ patch < ~/Downloads/nossl2.patch
patching file SSLeay.xs
$ make
$ make test
$ exit
You can s)kip, r)etry, f)orce install or l)ook ? [s] r
Successfully installed Crypt-SSLeay-0.58

The failures aren’t really any ones fault, it’s simply that things move on. I’m assuming the module will be patched soon and this blog post will become redundant. Until then hopefully this helps people find the RT case with the solution.


Update: Torsten Raudssus has just pointed out that there is a development version that appears to fix the problem. Check the CPAN page to see if it’s still the latest, but assuming it is install it like this. Note that when it’s released, it will probably be version 0.59. The _nn part gets dropped when it’s released.

cpanm NANIS/Crypt-SSLeay-0.59_03.tar.gz

Once the developer is happy with the patch and has released it, you should be able to go back to simply installing it with cpanm Crypt::SSLeay as usual. The development release means that until it is ready for the prime time, that installing the module without specifying the version number will pick up the previous release, 0.58. I’ll try to update this post again when I notice that it has been released.

About these ads
Tagged ,

7 thoughts on “Crypt::SSLeay and Ubuntu 11.10

  1. Chris says:

    Thank you very much! Very useful info that got me out of a hole! :-)

  2. Htbaa says:

    Thanks, solved my issue as well!

  3. Mark White says:

    Add another thank you to the list :)

  4. Bryon says:

    This module will not install in 10.11 either. Is there a fix yet?

  5. Alastait says:

    Having thrown myself in at the deep end with Perl development, this walkthrough of patching solved a massive problem – and a gap in the documentation from what I can see as well… Thank you :)

  6. cpanm NANIS/Crypt-SSLeay-0.59_03.tar.gz

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 58 other followers