dh_perl_openssl command not found

In this troubleshooting guide we learn how to fix dh_perl_openssl command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

dh_perl_openssl: command not found

or when using sudo you get the following error message

sudo: dh_perl_openssl: command not found

Solutions to dh_perl_openssl: command not found

How To Fix dh_perl_openssl: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu dh_perl_openssl is provided by perl-openssl-defaults package.

perl-openssl-defaults is:

A subset of Perl XS module packages expose the OpenSSL binary interface to Perl code. This can lead to incompatibilities if these packages are linked against different versions of OpenSSL.

This package provides a virtual package “perl-openssl-abi-x” that corresponds to the libssl-dev package SONAME it was built against. The packages that need to stay compatible with each other can depend on this.

Tools are also provided for generating this dependency with minimum hassle. See the instructions in README.Debian.

To fix this problem, we can install more using the command below.

sudo apt-get -y install perl-openssl-defaults

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install perl-openssl-defaults.

sudo apt -y install perl-openssl-defaults

Or if you have aptitude installed you can use the following command.

sudo aptitude install perl-openssl-defaults

Summary

In this tutorial we learn how to fix dh_perl_openssl command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.