mkcamlp5.opt command not found

In this troubleshooting guide we learn how to fix mkcamlp5.opt command not found error message

Introduction

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

mkcamlp5.opt: command not found

or when using sudo you get the following error message

sudo: mkcamlp5.opt: command not found

Solutions to mkcamlp5.opt: command not found

How To Fix mkcamlp5.opt: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu mkcamlp5.opt is provided by camlp5 package.

camlp5 is:

Objective Caml (OCaml) is an implementation of the ML language, based on the Caml Light dialect extended with a complete class-based object system and a powerful module system in the style of Standard ML.

CamlP4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers tools for syntax (Stream Parsers and Grammars) and the ability to modify the concrete syntax of the language (Quotations, Syntax Extensions).

This package contains the “classical” version of CamlP4 executables and libraries for pre-processing and pretty-printing OCaml sources both interactively and in a batch fashion. The “classical” version is the implementation of CamlP4 which used to be distributed with OCaml before the release of version 3.10.

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

sudo apt-get -y install camlp5

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

You can also use apt command to install camlp5.

sudo apt -y install camlp5

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

sudo aptitude install camlp5

Summary

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