Somedays ago, I was installing Dist::Zilla, but it failed due to a dependency CPAN::Uploader, which failed due to Net::SSLeay. This is the concerned build.log:
cpanm (App::cpanminus) 1.6911 on perl 5.016003 built for x86_64-linux
Work directory is /home/ubuntu/.cpanm/work/1372532802.14856
You have make /usr/bin/make
You have LWP 6.05
You have /bin/tar: tar (GNU tar) 1.26
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching install on cpanmetadb ...
install is up to date. (0.01)
Searching CPAN::Uploader on cpanmetadb ...
--> Working on CPAN::Uploader
Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/CPAN-Uploader-0.103004.tar.gz
-> OK
Unpacking CPAN-Uploader-0.103004.tar.gz
Entering CPAN-Uploader-0.103004
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.30 ... Yes (6.66)
Configuring CPAN-Uploader-0.103004
Running Makefile.PL
Warning: prerequisite LWP::Protocol::https 1 not found.
Checking if your kit is complete...
Looks good
Writing Makefile for CPAN::Uploader
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have File::Spec 0 ... Yes (3.40)
Checking if you have HTTP::Status 0 ... Yes (6.03)
Checking if you have File::Find 0 ... Yes (1.20)
Checking if you have LWP::Protocol::https 1 ... No
Checking if you have Getopt::Long::Descriptive 0.084 ... Yes (0.093)
Checking if you have Term::ReadKey 0 ... Yes (2.30)
Checking if you have warnings 0 ... Yes (1.13)
Checking if you have File::HomeDir 0 ... Yes (1.00)
Checking if you have Data::Dumper 0 ... Yes (2.135_06)
Checking if you have Carp 0 ... Yes (1.26)
Checking if you have HTTP::Request::Common 0 ... Yes (6.04)
Checking if you have Test::More 0.96 ... Yes (0.98)
Checking if you have strict 0 ... Yes (1.07)
Checking if you have LWP::UserAgent 0 ... Yes (6.05)
Checking if you have File::Temp 0 ... Yes (0.22)
Checking if you have File::Basename 0 ... Yes (2.84)
==> Found dependencies: LWP::Protocol::https
Searching LWP::Protocol::https on cpanmetadb ...
--> Working on LWP::Protocol::https
Fetching http://www.cpan.org/authors/id/G/GA/GAAS/LWP-Protocol-https-6.04.tar.gz
-> OK
Unpacking LWP-Protocol-https-6.04.tar.gz
Entering LWP-Protocol-https-6.04
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.66)
Configuring LWP-Protocol-https-6.04
Running Makefile.PL
Warning: prerequisite IO::Socket::SSL 1.54 not found.
Checking if your kit is complete...
Looks good
Writing Makefile for LWP::Protocol::https
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have IO::Socket::SSL 1.54 ... No
Checking if you have LWP::UserAgent 6.04 ... Yes (6.05)
Checking if you have Mozilla::CA 20110101 ... Yes (20130114)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.66)
Checking if you have Net::HTTPS 6 ... Yes (6.04)
==> Found dependencies: IO::Socket::SSL
Searching IO::Socket::SSL on cpanmetadb ...
--> Working on IO::Socket::SSL
Fetching http://www.cpan.org/authors/id/S/SU/SULLR/IO-Socket-SSL-1.94.tar.gz
-> OK
Unpacking IO-Socket-SSL-1.94.tar.gz
Entering IO-Socket-SSL-1.94
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.66)
Configuring IO-Socket-SSL-1.94
Running Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Net::SSLeay 1.46 not found.
Writing Makefile for IO::Socket::SSL
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have Net::SSLeay 1.46 ... No
Checking if you have Scalar::Util 0 ... Yes (1.25)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.66)
==> Found dependencies: Net::SSLeay
Searching Net::SSLeay on cpanmetadb ...
--> Working on Net::SSLeay
Fetching http://www.cpan.org/authors/id/M/MI/MIKEM/Net-SSLeay-1.55.tar.gz
-> OK
Unpacking Net-SSLeay-1.55.tar.gz
Entering Net-SSLeay-1.55
Checking configure dependencies from META.yml
Checking if you have ExtUtils::MakeMaker 6.36 ... Yes (6.66)
Configuring Net-SSLeay-1.53
Running Makefile.PL
*** Found OpenSSL-1.0.1 installed in /usr
*** Be sure to use the same compiler and options to compile your OpenSSL, perl,
and Net::SSLeay. Mixing and matching compilers is not supported.
Do you want to run external tests?
These tests *will* *fail* if you do not have network connectivity. [n] n
Checking if your kit is complete...
Looks good
Writing Makefile for Net::SSLeay
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have Test::More 0.60_01 ... Yes (0.98)
Checking if you have MIME::Base64 0 ... Yes (3.13)
Checking if you have ExtUtils::MakeMaker 6.36 ... Yes (6.66)
Building and testing Net-SSLeay-1.53
cp lib/Net/SSLeay.pm blib/lib/Net/SSLeay.pm
AutoSplitting blib/lib/Net/SSLeay.pm (blib/lib/auto/Net/SSLeay)
blib/lib/Net/SSLeay.pm: some names are not unique when truncated to 8 characters:
directory blib/lib/auto/Net/SSLeay:
do_https3.al, do_https2.al, do_https4.al, do_https.al truncate to do_https
do_httpx3.al, do_httpx2.al, do_httpx4.al truncate to do_httpx
get_https.al, get_https3.al, get_https4.al, get_http.al, get_http3.al, get_http4.al, get_httpx.al, get_httpx3.al, get_httpx4.al truncate to get_http
head_https.al, head_https3.al, head_https4.al, head_http.al, head_http3.al, head_http4.al, head_httpx.al, head_httpx3.al, head_httpx4.al truncate to head_htt
post_https.al, post_https3.al, post_https4.al, post_http.al, post_http3.al, post_http4.al, post_httpx.al, post_httpx3.al, post_httpx4.al truncate to post_htt
put_https.al, put_https3.al, put_https4.al, put_http.al, put_http3.al, put_http4.al, put_httpx.al, put_httpx3.al, put_httpx4.al truncate to put_http
ssl_read_all.al, ssl_read_until.al, ssl_read_CRLF.al truncate to ssl_read
ssl_write_all.al, ssl_write_CRLF.al truncate to ssl_writ
tcp_read_all.al, tcp_read_until.al, tcp_read_CRLF.al truncate to tcp_read
tcp_write_all.al, tcp_write_CRLF.al truncate to tcp_writ
cp lib/Net/SSLeay.pod blib/lib/Net/SSLeay.pod
cp lib/Net/SSLeay/Handle.pm blib/lib/Net/SSLeay/Handle.pm
/home/ubuntu/perl5/perlbrew/perls/perl-5.16.3/bin/perl "-Iinc" /home/ubuntu/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/ExtUtils/xsubpp -typemap /home/ubuntu/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/ExtUtils/typemap -typemap typemap SSLeay.xs > SSLeay.xsc && mv SSLeay.xsc SSLeay.c
cc -c -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.55\" -DXS_VERSION=\"1.55\" -fPIC "-I/home/ubuntu/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/x86_64-linux/CORE" SSLeay.c
SSLeay.xs:153:25: fatal error: openssl/err.h: No such file or directory
compilation terminated.
make: *** [SSLeay.o] Error 1
-> FAIL Installing Net::SSLeay failed. See /home/ubuntu/.cpanm/build.log for details.
-> FAIL Installing the dependencies failed: Module 'Net::SSLeay' is not installed
-> FAIL Bailing out the installation for IO-Socket-SSL-1.94. Retry with --prompt or --force.
-> FAIL Installing the dependencies failed: Module 'IO::Socket::SSL' is not installed
-> FAIL Bailing out the installation for LWP-Protocol-https-6.04. Retry with --prompt or --force.
-> FAIL Installing the dependencies failed: Module 'LWP::Protocol::https' is not installed
-> FAIL Bailing out the installation for CPAN-Uploader-0.103004. Retry with --prompt or --force.
I searched for these erors, but didn’t get any solution, so I asked on #distzilla on MAGnet. A person named leont said that it’s due to libssl-dev package. Net::SSLeay is an XS module and XS modules need some C header files. So to resolve this issue, I installed libssl-dev (I use XUbuntu).
Credits: Thanks to leont 🙂
i am facing same problem. How you install libssl-dev?
I’m using XUbuntu, so I did this on the terminal:
sudo apt-get install libssl-dev
You should search for the similar package for your linux distribution.
thank you, this worked for me on Ubuntu 12.04!!!
you’re welcome 🙂 I am glad, it worked for you 🙂
Worked like a charm. Thanks!
Thank you 🙂
Thanks, this helped a bunch!
You’re welcome 🙂
Great, Thanks. It works fine for me on Ubuntu 12*
You’re welcome 🙂
Thank you! This is shockingly over complicated,
You’re welcome.
Thanks. This saved me at least an hour of wild goose chase.
You’re welcome 🙂
Do you know where I can find this library for SUSE LInux 11 SP3? I have searched all over the place and could not find the right lib. I would appreciate if you can let me know how I can resolve this dependency issue. I tried to install this through yast and yast could not find this lib. I also added the repo and still didn’t help. Please advise.
I think you need to install libopenssl-devel, I compared the files in the two packages here : http://www.novell.com/products/linuxpackages/opensuse/libopenssl-devel.html & http://packages.ubuntu.com/precise/i386/libssl-dev/filelist
Thanks!
Thank you Shukla for your prompt response. I was able to find the repo for this package and tried to install them. When I tried to install the package, it is complaining about the dependencies. I don’t think I want to install the dependent packages since I already have the latest packages installed. Should I force the install with –nodeps? I have downloaded the zlib-devel and also the libopenssl-devel packages. Please advise.
Thanks,
KK
Sorry, I’ve no experience with OpenSUSE, so I can’t help much, I’d suggest you to ask on IRC or on stackoverflow or any other forum. Thanks.
Top Tipp! On RHEL6 I have to install openssl-static openssl-perl and openssl-devel, then Net::SSLeay and Crypt::SSLeay can be installed without errors.
Thank you!
I’m glad! 🙂
You’re welcome! 🙂
Thanks! You give a big help.It works fine for me on Ubuntu 12.04
Pingback: Perl Dist::Zilla doesn’t install because of Net::SSLeay on Debian Wheezy | Zagara Answers
Thanks a lot! Top of the google search results when I pasted my build error. Kept banging my head on the desk trying to figure out why SSLeay was failing to install via cpan or manual.
“openssl/err.h: No such file or directory”
Thanks, glad it helped!