dh_strip_nondeterminism command not found

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

Introduction

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

dh_strip_nondeterminism: command not found

or when using sudo you get the following error message

sudo: dh_strip_nondeterminism: command not found

Solutions to dh_strip_nondeterminism: command not found

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

In Ubuntu dh_strip_nondeterminism is provided by dh-strip-nondeterminism package.

dh-strip-nondeterminism is:

StripNondeterminism is a library for stripping non-deterministic information such as timestamps and filesystem ordering from various file and archive formats.

This can be used as a post-processing step to improve the reproducibility of a build product, when the build process itself cannot be made deterministic.

It is used as part of the Reproducible Builds project, although it should be considered a temporary workaround which should not be needed in the long term; upstream software should be reproducible even without using such a tool.

This package installs the ‘dh_strip_nondeterminism’ Debhelper command that strips nondeterminism as part of a Debian package build process.

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

sudo apt-get -y install dh-strip-nondeterminism

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

You can also use apt command to install dh-strip-nondeterminism.

sudo apt -y install dh-strip-nondeterminism

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

sudo aptitude install dh-strip-nondeterminism

Summary

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