dh_ocamldoc command not found

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

Introduction

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

dh_ocamldoc: command not found

or when using sudo you get the following error message

sudo: dh_ocamldoc: command not found

Solutions to dh_ocamldoc: command not found

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

In Ubuntu dh_ocamldoc is provided by dh-ocaml package.

dh-ocaml is:

dh-ocaml is a set of tools and documents to help maintaining Debian packages related to the Objective Caml (OCaml) programming language.

dh-ocaml notably contains the following components:

  • Makefile helpers to write debian/rules files implementing OCaml packaging best-practices (both for CDBS lovers and haters)
  • the Debian OCaml Packaging Policy
  • dh_ocaml debhelper to automatically computes dependencies among binary OCaml packages
  • ocaml-md5sums, the tool used to maintain the system registry of OCaml module interface checksums

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

sudo apt-get -y install dh-ocaml

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

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

sudo apt -y install dh-ocaml

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

sudo aptitude install dh-ocaml

Summary

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