ocamlfind command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
ocamlfind: command not found
or when using sudo you get the following error message
sudo: ocamlfind: command not found
Solutions to ocamlfind: command not found
How To Fix ocamlfind: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu ocamlfind is provided by ocaml-findlib package.
ocaml-findlib is:
The “findlib” OCaml library provides a scheme to manage reusable software components (packages), and includes tools that support this scheme. Packages are collections of OCaml modules for which metainformation can be stored. The packages are kept in the filesystem hierarchy, but with strict directory structure. The library contains functions to look the directory up that stores a package, to query metainformation about a package, and to retrieve dependency information about multiple packages.
This package contains a tool (ocamlfind) that allows the user to enter queries on the command-line. In order to simplify compilation and linkage, there are new frontends, all driven by ocamlfind, for the various OCaml compilers that can directly deal with packages.
To fix this problem, we can install more using the command below.
sudo apt-get -y install ocaml-findlib
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install ocaml-findlib.
sudo apt -y install ocaml-findlib
Or if you have aptitude installed you can use the following command.
sudo aptitude install ocaml-findlib
Summary
In this tutorial we learn how to fix ocamlfind command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.