Installing OCaml from source on Ubuntu
2016-05-02 22:32
Detailed steps to build OCaml can be found here.
The text might scare some, but the steps for Ubuntu are fairly straightforward. Here are the steps:
First, download a version from the release page
Then…
$ tar -xf ocaml-4.03.0.tar.xz
$ cd ocaml-4.03.0
$ ./configure
$ make world
$ make opt
$ sudo su
# umask 022
# make install
# make clean
# exit
$ wget https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh -O - | sh -s /usr/local/bin
The explanation for the above commands are:
- extract the archive file
- configure
- build the OCaml compiler (bytecode and native code)
- become root and install to binary directory
- clean up
- Install opam