Install Net::SSLeay

If the module won’t install with CPAN

perl -MCPAN -e shell
cpan[1]> install Net::SSLeay
.
.
.
SSLeay.xs:163:25: fatal error: openssl/err.h: No such file or directory
Failed during this command:
 MIKEM/Net-SSLeay-1.80.tar.gz                 : make NO

cpan[2]> exit

then you have to install libssl-dev before

apt-get install libssl-dev
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
The following additional packages will be installed:
  libssl-doc zlib1g-dev
Die folgenden NEUEN Pakete werden installiert:
  libssl-dev libssl-doc zlib1g-dev
0 aktualisiert, 3 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen 2.380 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 8.921 kB Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n] j
perl -MCPAN -e 'install Net::SSLeay'
Running install for module 'Net::SSLeay'
Checksum for /root/.cpan/sources/authors/id/M/MI/MIKEM/Net-SSLeay-1.80.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE
'YAML' not installed, will not store persistent state
Configuring M/MI/MIKEM/Net-SSLeay-1.80.tar.gz with Makefile.PL
*** Found OpenSSL-1.0.2g 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] y
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Net::SSLeay
Writing MYMETA.yml and MYMETA.json
  MIKEM/Net-SSLeay-1.80.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for M/MI/MIKEM/Net-SSLeay-1.80.tar.gz
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
Running Mkbootstrap for Net::SSLeay ()
chmod 644 "SSLeay.bs"
"/usr/bin/perl" "-Iinc" "/usr/share/perl/5.22/ExtUtils/xsubpp"  -typemap "/usr/share/perl/5.22/ExtUtils/typemap" -typemap "typemap"  SSLeay.xs > SSLeay.xsc && mv SSLeay.xsc SSLeay.c
i686-linux-gnu-gcc -c  -I/usr/include -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVERSION=\"1.80\" -DXS_VERSION=\"1.80\" -fPIC "-I/usr/lib/i386-linux-gnu/perl/5.22/CORE"   SSLeay.c
In file included from /usr/lib/i386-linux-gnu/perl/5.22/CORE/perl.h:5546:0,
                 from SSLeay.xs:141:
SSLeay.xs: In function ‘bn2sv’:
SSLeay.xs:1465:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
         ? sv_2mortal(newSViv((IV) BN_dup(p_bn)))
                              ^
/usr/lib/i386-linux-gnu/perl/5.22/CORE/embed.h:583:46: note: in definition of macro ‘sv_2mortal’
 #define sv_2mortal(a)  Perl_sv_2mortal(aTHX_ a)
                                              ^
SSLeay.xs:1465:22: note: in expansion of macro ‘newSViv’
         ? sv_2mortal(newSViv((IV) BN_dup(p_bn)))
                      ^
rm -f blib/arch/auto/Net/SSLeay/SSLeay.so
i686-linux-gnu-gcc  -shared -L/usr -L/usr/lib -L/usr/local/lib -fstack-protector-strong SSLeay.o  -o blib/arch/auto/Net/SSLeay/SSLeay.so     \
   -L/usr -L/usr/lib -lssl -lcrypto -lz      \
  
chmod 755 blib/arch/auto/Net/SSLeay/SSLeay.so
"/usr/bin/perl" "-Iinc" -MExtUtils::Command::MM -e 'cp_nonempty' -- SSLeay.bs blib/arch/auto/Net/SSLeay/SSLeay.bs 644
Manifying 2 pod documents
  MIKEM/Net-SSLeay-1.80.tar.gz
  make -- OK
Running make test
Running Mkbootstrap for Net::SSLeay ()
chmod 644 "SSLeay.bs"
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*/*.t t/*/*/*.t
t/external/08_external.t ............... ok   
t/external/15_altnames.t ............... ok   
t/external/20_cert_chain.t ............. ok   
t/external/ocsp.t ...................... # tcp connect to www.microsoft.com:443 ok
# got stapled OCSP response
# SSL_connect ok
t/external/ocsp.t ...................... 1/3 # tcp connect to www.heise.de:443 ok
# got no stapled OCSP response
# SSL_connect ok
# fingerprint matches
# status=0 as expected: nextUpd=Thu Jan 12 09:52:03 2017
# status=0 as expected: nextUpd=Fri Jan 13 03:36:43 2017
t/external/ocsp.t ...................... 2/3 # tcp connect to revoked.grc.com:443 ok
# got stapled OCSP response
# SSL_connect ok
# fingerprint matches
# status=1 as expected: nextUpd=Tue Jan 10 14:07:31 2017
# status=1 as expected: nextUpd=Thu Jan 12 19:45:11 2017
# status=0 as expected: nextUpd=Thu Jan 12 19:45:12 2017
t/external/ocsp.t ...................... ok   
t/handle/external/10_destroy.t ......... ok   
t/handle/external/50_external.t ........ ok     
t/handle/local/05_use.t ................ ok   
t/local/01_pod.t ....................... skipped: Test::Pod 1.00 required for testing POD
t/local/02_pod_coverage.t .............. skipped: these tests are for only for release candidate testing. Enable with RELEASE_TESTING=1
t/local/03_use.t ....................... ok   
t/local/04_basic.t ..................... 1/6 # Version info:
# Testing Net::SSLeay 1.80, Perl 5.022001, /usr/bin/perl
# OpenSSL version:  'OpenSSL 1.0.2g  1 Mar 2016'
# OpenSSL platform: 'platform: debian-i386'
t/local/04_basic.t ..................... ok   
t/local/05_passwd_cb.t ................. ok     
t/local/06_tcpecho.t ................... ok   
t/local/07_sslecho.t ................... ok     
t/local/08_pipe.t ...................... ok     
t/local/15_bio.t ....................... ok   
t/local/20_autoload.t .................. ok       
t/local/21_constants.t ................. ok       
t/local/30_error.t ..................... skipped: Requires Test::Exception, Test::Warn and Test::NoWarnings
t/local/31_rsa_generate_key.t .......... ok     
t/local/32_x509_get_cert_info.t ........ ok         
t/local/33_x509_create_cert.t .......... ok       
t/local/34_x509_crl.t .................. ok     
t/local/35_ephemeral.t ................. ok   
t/local/36_verify.t .................... ok     
t/local/37_asn1_time.t ................. ok     
t/local/38_priv-key.t .................. ok     
t/local/39_pkcs12.t .................... ok     
t/local/40_npn_support.t ............... ok   
t/local/41_alpn_support.t .............. ok   
t/local/42_info_callback.t ............. ok   
t/local/50_digest.t .................... ok       
t/local/61_threads-cb-crash.t .......... ok   
t/local/62_threads-ctx_new-deadlock.t .. ok   
t/local/63_ec_key_generate_key.t ....... ok   
t/local/64_ticket_sharing.t ............ ok     
t/local/kwalitee.t ..................... skipped: these tests are for only for release candidate testing. Enable with RELEASE_TESTING=1
All tests successful.
Files=37, Tests=2772, 28 wallclock secs ( 1.06 usr  0.21 sys +  8.36 cusr  0.57 csys = 10.20 CPU)
Result: PASS
  MIKEM/Net-SSLeay-1.80.tar.gz
  make test -- OK
Running make install
Manifying 2 pod documents
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/SSLeay.so
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/Net/SSLeay.pod
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/Net/SSLeay.pm
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/Net/SSLeay/Handle.pm
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/get_http3.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/post_https4.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/tcp_write_CRLF.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/post_http3.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/make_headers.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/get_http4.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/tcp_read_all.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/make_form.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/https_cat.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/want_write.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/do_https3.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/put_https3.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/ssl_read_all.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/initialize.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/post_httpx4.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/debug_read.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/head_httpx4.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/post_httpx3.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/ssl_write_CRLF.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/get_httpx3.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/put_httpx3.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/tcp_write_all.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/ssl_read_CRLF.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/autosplit.ix
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/tcpxcat.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/dump_peer_certificate.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/get_httpx.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/head_https4.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/get_httpx4.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/want_nothing.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/head_httpx.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/do_httpx3.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/ssl_write_all.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/want_read.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/set_cert_and_key.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/head_https3.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/put_http3.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/do_httpx4.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/post_http.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/head_httpx3.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/tcp_read_CRLF.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/do_httpx2.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/put_https4.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/do_https2.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/http_cat.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/post_http4.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/get_https3.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/put_http4.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/put_https.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/put_http.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/post_httpx.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/get_https4.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/open_tcp_connection.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/sslcat.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/do_https4.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/tcpcat.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/post_https.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/randomize.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/open_proxy_tcp_connection.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/put_httpx4.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/want_X509_lookup.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/set_server_cert_and_key.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/new_x_ctx.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/get_https.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/head_http3.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/put_httpx.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/httpx_cat.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/head_http.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/get_http.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/set_proxy.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/post_https3.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/head_https.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/head_http4.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/tcp_read_until.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/ssl_read_until.al
Installing /usr/local/lib/i386-linux-gnu/perl/5.22.1/auto/Net/SSLeay/do_https.al
Installing /usr/local/man/man3/Net::SSLeay.3pm
Installing /usr/local/man/man3/Net::SSLeay::Handle.3pm
Appending installation info to /usr/local/lib/i386-linux-gnu/perl/5.22.1/perllocal.pod
  MIKEM/Net-SSLeay-1.80.tar.gz
  make install  -- OK

cpan[3]> exit