OPAM 1.1 is no longer supported. Documentation for OPAM 1.2 is available
here.

Install OPAM in 2 minutes

This page describes how to install and configure OPAM.
For further help on how to use OPAM, either read
opam --help or move on to the Basic Usage guide.

Installing OPAM with your distribution

You can use the OPAM package of your distribution if
available. Here is a list of supported distributions:

Archlinux

The opam and opam-git packages are available in the AUR. Replace opam with opam-git in the following instruction to get the development version:

yaourt -S opam

Debian

Binary packages of OPAM 1.1.1 are available for the testing and unstable distributions. Wheezy users are left with the options of compiling from source, pinning the packages from the testing repository, requesting a backport from Debian, or using our binary installer below.

Ubuntu (Precise, Quantal, Raring and Saucy)

If the command add-apt-repository is not available, you can install the package python-software-properties with apt-get install python-software-properties. Alternatively, you may manually edit the file /etc/apt/sources.list to add the PPA for your Ubuntu release.

Ubuntu Trusty LTS

OCaml 4.01.0 and OPAM 1.1.1 are included in Ubuntu Trusty's universe repository, so just install them as normal.

Binary installer

Pre-compiled versions for most common architectures and OSes are available on the Github "releases" page. We also provide a very simple installer script that will automatically download the right version for you, put it in your binary directory and initialize it.

Using ocamlbrew

ocamlbrew is a script that can bootstrap an OCaml environment including OPAM, from source. This option does not require an existing OCaml installation, or a pre-compiled OPAM binary for your platform. To bootstrap a new OCaml environment including OPAM, make sure that you have the necessary pre-requisites installed to run ocamlbrew, and then run: