Perl error for LWP::Protocol::https

Problem with HTTPS in Perl

When you see any of the below error messages, the solution is

sudo apt-get install libssl-dev

Error >> openssl-version.c:2:30: fatal error: openssl/opensslv.h: No such file or directory

Error >> Warning: Prerequisite ‘Net::SSLeay => 1.46’ for ‘SULLR/IO-Socket-SSL-2.012.tar.gz’ failed when processing ‘MIKEM/Net-SSLeay-1.68.tar.gz’ with ‘make => NO’. Continuing, but chances to succeed are limited.

Error >> t/connectSSL-timeout.t ………… Can’t locate Net/SSLeay.pm in @INC (@INC contains:

Configuring N/NA/NANIS/Crypt-SSLeay-0.72.tar.gz with Makefile.PL

*** THIS IS NOT AN ERROR, JUST A MESSAGE FOR YOUR INFORMATION ***

Do you really need Crypt::SSLeay?

Starting with version 6.02 of LWP, https support was unbundled into
LWP::Protocol::https. This module specifies as one of its prerequisites
IO::Socket::SSL which is automatically used by LWP::UserAgent unless
this preference is overridden separately. IO::Socket::SSL is a more
complete implementation, and, crucially, it allows hostname
verification. Crypt::SSLeay does not support this. At this point,
Crypt::SSLeay is maintained to support existing software that already
depends on it.

However, it is possible that your software does not really depend on
Crypt::SSLeay, only on the ability of LWP::UserAgent class to
communicate with sites over SSL/TLS.

If are using version LWP 6.02 or later, and therefore have installed
LWP::Protocol::https and its dependencies, and do not explicitly use
Net::SSL before loading LWP::UserAgent, or override the default socket
class, you are probably using IO::Socket::SSL and do not really need
Crypt::SSLeay.

Before installing Crypt::SSLeay, you may want to try specifying a
dependency on LWP::Protocol::https.

openssl-version.c:2:30: fatal error: openssl/opensslv.h: No such file or directory
compilation terminated.
Failed to build and link a simple executable using OpenSSL
Failed during this command:
NANIS/Crypt-SSLeay-0.72.tar.gz : writemakefile NO — No ‘Makefile’ created

You may also like...