Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whosgonna/7aebefbe0445f83eda955adc07b6003a to your computer and use it in GitHub Desktop.
Save whosgonna/7aebefbe0445f83eda955adc07b6003a to your computer and use it in GitHub Desktop.

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

DEBIAN

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

CentOS

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment