I had a problem installing LWP::Protocol::https
because the dependancy Net::SSLeay
was failing to install.
The issue was with missing development libraries for openssl and zlib1g.
The error in the log for missing the openssl development headers when installing Net::SSLeay
looked like this:
cc -c -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -DVERSION=\"1.88\" -DXS_VERSION=\"1.88\" -fPIC "-I/home/ben/.plenv/versions/5.32.0/lib/perl5/5.32.0/x86_64-linux-thread-multi/CORE" SSLeay.c
SSLeay.xs:163:10: fatal error: openssl/err.h: No such file or directory
#include <openssl/err.h>
^~~~~~~~~~~~~~~
compilation terminated.
The subsequent
For the zlib1g dependancy the installation error was a bit more cryptic:
/usr/bin/ld: cannot find -lz
The easiest solution (if possible, of course) to install the OS packages for these dependancies. In Debian (probably Ubuntu as well), do this:
sudo apt-get install libssl-dev
sudo apt install zlib1g-dev
Maybe there's more than this needed. The server I was installing on had other things installed so perhaps zlib was instaleld by something else first. To get the correct openssl dependancies:
sudo yum install openssl-devel