Boris Däppen
Boris Däppen

Reputation: 1196

Perl Dist::Zilla doesn't install because of Net::SSLeay on Debian Wheezy

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

Answers (1)

yahermann
yahermann

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:

  1. Install dependencies:

    sudo apt install build-essential checkinstall zlib1g-dev -y

  2. Create a subdirectory for OpenSSL under Perlbrew:

    mkdir ~/perl5/perlbrew/openssl

  3. 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

  4. Install and compile. Starting at above directory:

    ./config shared --prefix=$PERLBREW_ROOT/openssl

    make

    make test

  5. Install Net::SSLeay using cpanm:

    cpanm install Net::SSLeay

Upvotes: 1

Related Questions