Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
OPAM is a source-based package manager for OCaml. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.
OCaml Makefile Shell

Merge pull request #2090 from OCamlPro/conflicts-improvements

Better and shorter conflict messages
latest commit c6a61de021
@AltGr AltGr authored
Failed to load latest commit information.
admin-scripts Give numbers to opam lint's warn/errors
doc Fix incorrect contractions in messages.
m4 remove caml4boot from the test, as its not used and sometimes (on Deb…
shell Update 'opam_installer' script for 1.2.1
src Improve reasons display for downgrades causing reinstalls (typically …
src_ext Fix incorrect contractions in messages.
tests Fix tests for added compilers-packages precondition
.gitignore Move OpamGitVersion to the end of compilation
.ocp-indent Make --dry-run a real dry-run, and add --show to check the update Update travis test to reflect the currently available versions
.travis.yml Update travis test to reflect the currently available versions
CHANGES Update CHANGES update CONTRIBUTING to ask for `opam config report`
LICENSE A few copyright and license fixes add jsonm to META
Makefile Move OpamGitVersion to the end of compilation Clean build both with safe-string and older OCamls
OCamlMakefile Makefile: fix dependencies calculation Fixed two spelling mistakes and flow of wording in several places
appveyor.yml Add an experimental Appveyor Windows/Cygwin32 build file
configure Update the CHANGELOG, prepare for beta release Update the CHANGELOG, prepare for beta release
opam update opam-lib's opam file
opam-devel.opam Add an opam file to allow pinning OPAM itself
opam-lib.install Include mli and optionally cmxs files in opam-lib.install
opam.install Don't install manpages for command aliases

OPAM - A package manager for OCaml

OPAM is a source-based package manager for OCaml. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.

OPAM was created and is maintained by OCamlPro.

To get started, checkout the Install and Usage guides.

Compiling this repo

  • Make sure you have OCaml and GNU make installed. If you don't have a recent enough version of OCaml (>= 3.12.1) at hand, see the next paragraph.
  • Run ./configure
  • Run make lib-ext as advertised by ./configure if you don't have the dependencies installed and only need the opam binary (not the libs). This will locally take care of all OCaml dependencies for you.
  • Otherwise, make sure to have ocamlfind, ocamlgraph, cmdliner, jsonm, cudf, dose 3.2.2+opam and re >= 1.2.0 installed. Or run opam install opam-lib --deps-only if you already have a working instance. Re-run ./configure once done.
  • Run make
  • Run make install
  • Run make libinstall if needed (this is incompatible with make lib-ext, as the opam library would conflict with installed versions of the dependencies)

Compiling without OCaml

make cold is provided as a facility to compile OCaml, then bootstrap OPAM. You don't need need to run ./configure in that case, but you may specify CONFIGURE_ARGS if needed, e.g.:

make cold CONFIGURE_ARGS="--prefix ~/local"

NOTE: You'll still need GNU make.

Bug tracker

Have a bug or a feature request ? Please open an issue on our bug-tracker. Please search for existing issues before posting, and include the output of opam config report and any details that may help track down the issue.


User Manual

The main documentation entry point to OPAM is the user manual, available using opam --help. To get help for a specific command, use opam <command> --help.

Guides and Tutorials

A collection of guides and tutorials is available online. They are generated from the files in doc/pages.

API, Code Documentation and Developer Manual

A more thorough technical document describing OPAM and specifying the package description format is available in the developer manual. make doc will otherwise make the API documentation available under doc/.


Keep track of development and community news.

  • Have a question that's not a feature request or bug report? Ask on the mailing list.

  • Chat with fellow OPAMers on IRC. On the server, in the #ocaml or the #opam channel.


We welcome contributions ! Please use Github's pull-request mechanism against the master branch of the OPAM repository. If that's not an option for you, you can use git format-patch and email TODO.


The release cycle respects Semantic Versioning.

Related repositories

  • ocaml/opam-repository is the official repository for OPAM packages and compilers. A number of non-official repositories are also available on the interwebs, for instance on Github.
  • opam2web generates a collection of browsable HTML files for a given repository. It is used to generate
  • opam-rt is the regression framework for OPAM.
  • opam-publish is a tool to facilitate the creation, update and publication of OPAM packages.

Copyright and license

Copyright 2012-2014 OCamlPro Copyright 2012 INRIA

All rights reserved. OPAM is distributed under the terms of the GNU Lesser General Public License version 3.0.

OPAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Something went wrong with that request. Please try again.