Search code examples
ocamlopamocaml-dune

OCaml build tool dune installed, but doesn't run


I recently started learning OCaml, and wanted to install the dune build tool. I used opam install dune, then followed the instructions here. However, when running dune build hello_world.exe, I got the following error:

The program 'dune' is currently not installed. You can install it by typing:
sudo apt install whitedune

apt search whitedune tells me that this has nothing to do with the dune I want.

I double checked that dune was installed and re-ran opam install dune, to get the message:

[NOTE] Package dune is already installed (current version is 1.2.1).

After running opam remove dune and opam install dune, the problem persists.

I am running Elementary OS 0.4.1 Loki.

Thank you!


Solution

  • I forgot to run eval $(opam config env). Oops.