Good tools to manage OCaml packages

Which tools to mange OCaml packages in my system (Linux)?

I use OPAM to manage OCaml packages: http://opam.ocamlpro.com/index.html

To install it:

$ wget https://raw.githubusercontent.com/ocaml/opam/master/shell/opam_installer.sh
$ sh ./opam_installer.sh /usr/local/bin

More options are available here.

To make opam settings take effect, append this to ~/.bashrc:

eval `opam config env`

Some frequent usages:

opam list               # List all available packages
opam search QUERY       # List packages with QUERY in their name or description
opam info PACKAGE       # Display information about PACKAGE

opam update             # Update the packages database

opam install PACKAGE    # Download, build and install the latest version of PACKAGE

More usages are available here.


Another good tools is GODI: http://godi.camlcity.org/godi/index.html


A tip I find to reinstall OCaml again found after I deleted the ~/.opam directory by accident:

Initialize your opam profile:

opam init

Install OCaml (note: NOT by opam install):

opam switch 4.00.1

You can check all available versions of OCaml by:

opam switch

On Ubuntu/Linux Mint, you can install opam from the repository:

$ sudo aptitude install opam

Another option is GODI:

It can be downloaded and installed following the tutorial here: http://godi.camlcity.org/godi/get_godi.html


Sadly, GODI is to be shutdown in September 2013. Check the announcement by Gerd Stolpmann: http://blog.camlcity.org/blog/godi_shutdown.html

Leave a Reply

Your email address will not be published. Required fields are marked *