dh_linktree command not found

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

Introduction

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

dh_linktree: command not found

or when using sudo you get the following error message

sudo: dh_linktree: command not found

Solutions to dh_linktree: command not found

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

In Ubuntu dh_linktree is provided by dh-linktree package.

dh-linktree is:

Many developers bundle PHP or JavaScript libraries in the software that they provide. The Debian packager must then replace those “embedded copies” with symlinks to the packaged copy of those files. This operation is not without risks. A version mismatch can be the source of bugs that are hard to track.

dh_linktree is a tool that can assist you in this task. It can either unconditionally install a symlink tree of a given directory at the place of your choice, or it can only replace existing files with symlinks, or it can only replace existing identical files with symlinks.

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

sudo apt-get -y install dh-linktree

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

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

sudo apt -y install dh-linktree

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

sudo aptitude install dh-linktree

Summary

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