dh_configpackage command not found

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

Introduction

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

dh_configpackage: command not found

or when using sudo you get the following error message

sudo: dh_configpackage: command not found

Solutions to dh_configpackage: command not found

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

In Ubuntu dh_configpackage is provided by config-package-dev package.

config-package-dev is:

This package contains a system of modules for creating Debian configuration packages: packages that configure an existing Debian system by using dpkg-divert on configuration files. These modules attempt to make the process of creating configuration packages efficient by checking the md5sums of upstream configuration files that are to be modified and automatically generating the relevant postinst code to perform the diversions using the standard debhelper mechanism. In addition to a debhelper command and sequencer extension module, CDBS modules are also included, but future development will focus on the debhelper interface.

The config-package-dev modules are optimized for site defaults (i.e. configuration for a university or a company), though they are useful for other applications as well.

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

sudo apt-get -y install config-package-dev

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

You can also use apt command to install config-package-dev.

sudo apt -y install config-package-dev

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

sudo aptitude install config-package-dev

Summary

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