dh_buildinfo command not found

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

Introduction

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

dh_buildinfo: command not found

or when using sudo you get the following error message

sudo: dh_buildinfo: command not found

Solutions to dh_buildinfo: command not found

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

In Ubuntu dh_buildinfo is provided by dh-buildinfo package.

dh-buildinfo is:

This script is designed to be run at build-time, and registers in a file the list of packages declared as build-time dependencies, as well as build-essential packages, together with their versions, as installed in the build machine.

This will hopefully help to track packages (auto-)built with package versions which are known to be buggy, and, more generally, to find out whether a package needs to be rebuilt because of a significant change in a package it has a build-time dependency on.

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

sudo apt-get -y install dh-buildinfo

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

You can also use apt command to install dh-buildinfo.

sudo apt -y install dh-buildinfo

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

sudo aptitude install dh-buildinfo

Summary

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