You can install the current version of OCaml (4.02.1, from October 2014),
together with the Findlib add-on and OPAM package manager, by opening a Terminal and typing:
- sudo port install ocaml caml-findlib opam
+ sudo port install ocaml ocaml-findlib opam
As with Scheme, it's helpful to also have rlwrap installed, and to start OCaml as `rlwrap ocaml`. This gives
you a nice history of the commands you've already typed, which you can scroll up and down in with your
Use your packaging system, for example, open a Terminal and
type:
- sudo apt-get install ocaml ocaml-findlib opam
+ sudo apt-get install ocaml opam camlp4-extra ocaml-findlib
That will install a version of OCaml and the Findlib add-on and OPAM package manager.
+ If you're using Ubuntu "Utopic" (14.10), there's [a note on the OPAM home page](https://github.com/ocaml/opam)
+ warning that its version of OPAM is broken, and not to use it. Here's how you can get (OCaml and) OPAM from a newer repository:
+
+ sudo apt-get install -y software-properties-common
+ sudo apt-apt-repository -y ppa:avsm/ppa
+ sudo apt-get update
+ sudo apt-get install ocaml opam
+
If for some reason you can't get OCaml through your
packaging system, you can go to
<http://caml.inria.fr/download.en.html>.