dh_dzil_clean command not found

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

Introduction

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

dh_dzil_clean: command not found

or when using sudo you get the following error message

sudo: dh_dzil_clean: command not found

Solutions to dh_dzil_clean: command not found

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

In Ubuntu dh_dzil_clean is provided by dh-dist-zilla package.

dh-dist-zilla is:

dh-dist-zilla provides a debhelper sequence addon named ‘dist_zilla’, i.e. you can use it in your project’s debian/rules as “dh $@ –with dist-zilla”.

The intention is to be able to build Debian Perl packages directly from a Dist::Zilla based Perl distributions without generating the CPAN distribution tar-ball manually first. It is analogous to using autoreconf to generate the configure script.

The orig.tar.gz/.xz file must only contain the dist.ini and source files but not the generated files like META.yml, README, etc. If you use dh-dist-zilla, you can use “debian/rules get-orig-source” to generate a conforming upstream tar ball if none is available yet.

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

sudo apt-get -y install dh-dist-zilla

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

You can also use apt command to install dh-dist-zilla.

sudo apt -y install dh-dist-zilla

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

sudo aptitude install dh-dist-zilla

Summary

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