|Number of watchers on Github||627|
|Number of open issues||158|
|Average time to close an issue||3 days|
|Average time to merge a PR||1 day|
|Open pull requests||54+|
|Closed pull requests||27+|
|Last commit||9 months ago|
|Repo Created||almost 7 years ago|
|Repo Last Updated||9 months ago|
|Organization / Author||ocaml|
|Do you use opam? Leave a review!|
|View open issues (158)|
|View opam activity|
|View TODOs for opam (8)|
|View on github|
|Fresh, new opensource launches 🚀🚀🚀|
Trendy new open source projects in your inbox! View examples
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.
Either from an existing opam installation, use
opam pin add opam-devel
make lib-extas advertised by
./configureif you don't have the dependencies installed. This will locally take care of all OCaml dependencies for you (downloading them, unless you used the inclusive archive we provide for each release).
This is all you need for installing and using opam, but if you want to use the
opam-lib (to work on opam-related tools), you need to link it to installed
libraries, rather than use
make lib-ext which would cause conflicts. It's
easier to already have a working opam installation in this case, so you can do
it as a second step.
opam install opam-lib --deps-onlyif you already have a working instance. Re-run
make libinstallat the end
If you are developing OPAM, you may enable developer features by including the
--enable-developer-mode parameter with
BUILDING ON WINDOWS IS A WORK-IN-PROGRESS AND THESE INSTRUCTIONS WILL EVOLVE!
Cygwin (https://www.cygwin.com/setup-x86_64.exe) is always required to build opam on Windows. Both the 64-bit and 32-bit versions of Cygwin may be used (you can build 32-bit opam using 64-bit Cygwin and vice versa though note that you must be running 64-bit Windows in order to build the 64-bit version).
The following Cygwin packages are required:
patch(not required if OCaml and all required packages are pre-installed)
m4(unless required packages are pre-installed or built using
make lib-extrather than
m4is required by findlib's build system)
mingw64-x86_64-gcc-core(not required if building with MSVC)
Alternatively, having downloaded Cygwin's setup program, Cygwin can be installed using the following command line:
setup-x86_64 --root=C:\cygwin64 --quiet-mode --no-desktop --no-startmenu --packages=make,mingw64-i686-gcc-core,mingw64-x86_64-gcc-core,m4,patch
--no-startmenu switches may be omitted in order to create
shortcuts on the Desktop and Start Menu respectively. Executed this way, setup will
still be interactive, but the packages will have been pre-selected. To make setup
fully unattended, choose a mirror URL from https://cygwin.com/mirrors.lst and add
the --site switch to the command line
It is recommended that you set the
CYGWIN environment variable to
Cygwin is started either from a shortcut or by running:
It is recommended that opam be built outside Cygwin's root
/cygdrive/c/...). From an elevated Cygwin shell, edit
ensure that the file's content is exactly:
none /cygdrive cygdrive noacl,binary,posix=0,user 0 0
The change is the addition of the
noacl option to the mount instructions for
/cygdrive and this stops from Cygwin from attempting to emulate POSIX permissions
over NTFS (which can result in strange and unnecessary permissions showing up in
Windows Explorer). It is necessary to close and restart all Cygwin terminal windows
opam is able to be built without a pre-installed OCaml compiler. For the MSVC ports of OCaml, the Microsoft Windows SDK 7 or later or Microsoft Visual Studio is required (https://www.microsoft.com/en-gb/download/details.aspx?id=8442 - either x86 or x64 may be installed, as appropriate to your system). It is not necessary to modify PATH, INCLUDE or LIB - opam's build system will automatically detect the required changes.
If OCaml is not pre-installed, run:
make compiler [OCAML_PORT=mingw64|mingw|msvc64|msvc|auto]
OCAML_PORT variable determines which flavour of Windows OCaml is compiled -
auto will attempt to guess. As long as
gcc is not installed in Cygwin
(i.e. the native C compiler for Cygwin),
OCAML_PORT does not need to be
auto will be assumed. Once the compiler is built, you may run:
to install the dependencies as findlib packages to the compiler. Building
requires the ability to create native symbolic links (and the
winsymlinks:native) - this means that either Cygwin must be run
elevated from an account with administrative privileges or your user account must be
granted the SeCreateSymbolicLinkPrivilege either by enabling Developer mode on
Windows 10, or using Local Security Policy on earlier versions of Windows.
Alternatively, you may run
configure and use
make lib-ext, as advised.
You can then
configure and build opam as above.
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" make cold-install
NOTE: You'll still need GNU make.
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.
The main documentation entry point to opam is the user manual,
opam --help. To get help for a specific command, use
opam <command> --help.
A more thorough technical document describing opam and specifying the package
description format is available in the
doc will otherwise make the API documentation available under
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
#ocaml or the
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 us.
The release cycle respects Semantic Versioning.
The version comparison function in
src/core/opamVersionCompare.ml is part of
the Dose library and Copyright 2011 Ralf Treinen.
All other code is:
Copyright 2012-2016 OCamlPro Copyright 2012 INRIA
All rights reserved. Opam is distributed under the terms of the GNU Lesser General Public License version 2.1, with the special exception on linking described in the file LICENSE.
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 Lesser General Public License for more details.
Release candidate for 2.0.0
Small fixes over beta5
This new beta brings many usability improvements and fixes. Most notably:
depexts:. Opam can now directly extract them for the current system (
opam-depextis still required to talk to the host package manager, although hooks are even possible to make that automatic)
glpkis now also built in, hence not required to compile opam
lockedopam files and reproduceable build environments with the new
eval $(opam env))
There is much more, please see the changelog for details.
NOTE: due to format changes, be careful when using the official 2.0 repository (at https://opam.ocaml.org/2.0): once it is switched to the new format, older betas will complain (
depexts issues or
post flags). Until then, this release will already work fine except for some possible quirks with depexts.