dtdiff command not found

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

Introduction

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

dtdiff: command not found

or when using sudo you get the following error message

sudo: dtdiff: command not found

Solutions to dtdiff: command not found

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

In Ubuntu dtdiff is provided by device-tree-compiler package.

device-tree-compiler is:

Device Tree Compiler, dtc, takes as input a device-tree in a given format and outputs a device-tree in another format for booting kernels on embedded systems.

Typically, the input format is “dts”, a human readable source format, and creates a “dtb”, or binary format as output.

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

sudo apt-get -y install device-tree-compiler

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

You can also use apt command to install device-tree-compiler.

sudo apt -y install device-tree-compiler

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

sudo aptitude install device-tree-compiler

Summary

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