Reputation: 1196
I am using perlbrew together with cpanm on debian wheezy.
I tried to install Dist::Zilla but installation failed because of Net::SSLeay
.
Error message: SSLeay.xs:153:25: fatal error: openssl/err.h: Datei oder Verzeichnis nicht gefunden
(German for "openssl/err.h not found").
People suggest installing libssl-dev
which I have already done and does not help.
Is it that something has changed from Squeeze to Wheezy and Perl-Modules are not aware of yet??
Upvotes: 2
Views: 359
Reputation: 1579
The problem is likely that OpenSSL needs to be compiled into the Perlbrew environment -- the same environment that will run Net::SSLeay. Try this recipe:
Install dependencies:
sudo apt install build-essential checkinstall zlib1g-dev -y
Create a subdirectory for OpenSSL under Perlbrew:
mkdir ~/perl5/perlbrew/openssl
Download & extract latest LTS OpenSSL into above directory. To determine latest LTS OpenSSL, go to https://openssl.org/source/ and find the latest stable version. For example below we use openssl-1.1.1.tar.gz:
cd ~/perl5/perlbrew/openssl
wget https://www.openssl.org/source/openssl-1.1.1.tar.gz [replace with latest LTS version]
tar -xf openssl-1.1.1.tar.gz
cd openssl-1.1.1
Install and compile. Starting at above directory:
./config shared --prefix=$PERLBREW_ROOT/openssl
make
make test
Install Net::SSLeay using cpanm:
cpanm install Net::SSLeay
Upvotes: 1