OPAM-INSTALL(1)
okay so you found the opam-install page, it lives in the Opam Manual (section 1, she's a classic π ), and honestly? bestie, this is the one that does the thing. The installing thing. Let's get into it.
β¨ NAME β¨
opam-install β install a list of packages. That's it. That's the whole job. π
πΈ SYNOPSIS πΈ
opam install [OPTION]β¦ [PACKAGES]β¦
π¦ DESCRIPTION π¦
So this command installs one or more packages inside the currently selected switch (peep opam switch if you don't know which one that is, iykyk). And once they're in? The whole ecosystem opens up: you can yeet packages back out with opam remove, glow them up with opam upgrade, and see the full roster with opam list. Also check out opam pin β that's the one for managing package versions, rerouting existing packages, or adding packages that literally are not defined in the repositories. So versatile. Main character behaviour fr fr. β¨
All required dependencies of the packages you picked get installed first, obviously, because we're not monsters. Any already-installed packages that have dependencies (or optional dependencies) pointing at the changed packages will get recompiled β sorry babes, that's just the cost of doing business. And ngl, the proposed solution might also imply <italics>removing</italics> incompatible or conflicting packages. The solver does not negotiate. π
Oh and here's a cute plot twist: if you hand it paths instead of package names, it assumes those paths point to either project source directories containing one or more package definitions (opam files), or directly to opam files themselves. Then the corresponding packages get pinned to their local directory and installed β unless --deps-only was specified. Little exception, big impact. π
π ARGUMENTS π
PACKAGESβ a list of package names, with an optional version or constraint, likepkg,pkg.1.0orpkg>=0.5; or files or directory names containing package description, with explicit directory (e.g../foo.opamor.)
π OPTIONS π
--assume-builtβ for use on locally-pinned packages: it assumes they've already been correctly built and only runs their installation instructions, straight from their source directory. This skips the build instructions entirely and is lowkey so useful when you're installing packages you're actively working on. Implies--inplace-build. And no, no locally-pinned packages will be skipped. Everyone's coming to the party. π«Ά--checkβ exits with0if all the dependencies ofPACKAGESare already installed. If they're not, it prints the names of the missing dependencies to stdout and exits with1. A vibe check, but for deps. π--depext-onlyβ resolves the package installation normally, but only installs the required system dependencies, without touching the opam switch state or installing any opam packages. Minimal footprint, maximal manners.--deps-onlyβ install all its dependencies, but don't actually install the package. Snack on the sides, skip the main course. π--destdir=DIRβ copies the files installed by the given package within the current opam switch below the prefixDIR, respecting their hierarchy, after installation. β οΈ Caution: calling this can overwrite files, but it will never remove files, even if they were installed by a previous use of--destdir, e.g. on a previous version of the same package. Seeopam remove --destdirto revert. Not me warning you twice, it's giving consequences. π--download-onlyβ fetches the sources of the packages, but doesn't build or install anything. Window shopping, but make it package management. ποΈ--formula=FORMULA(absent=[]) β experimental! Specify a dependency formula to be verified by the solution, in addition to the switch invariant. The format is the same as for expressing dependencies in package definition files, e.g.'"foo" {>= "1.1"}'. It's giving scientist energy π§ͺ--ignore-conflictsβ used with--deps-only, ignores conflicts of given package. Peace was never an option, or whatever.--recursiveβ allows recursive lookups of*.opamfiles. Cf.--subpathalso. π--restoreβ attempts to restore packages that were marked for installation but have been removed due to errors. The comeback arc we deserve. β--set-rootβ marks given packages as installed roots. This is the default for newly manually-installed packages. So like, the usual, but now it's officially a choice. π--subpath=PATHβ*.opamfiles are retrieved from the given sub directory instead of top directory. Sources are then taken from the targeted sub directory; internally only this subdirectory is copied/fetched. It can be combined with--recursiveto have a recursive lookup on the subpath. Nested. Layered. Iconic. πΈ--unset-rootβ marks given packages as "installed automatically". Demotes them from root status, respectfully. π
π₯ PACKAGE BUILD OPTIONS π₯
--assume-depextsβ skips the installation step for any missing system packages and attempts to proceed with compilation of the opam packages anyway. If the installation succeeds, opam won't prompt you about these system packages ever again. Only meaningful if external dependency handling is enabled. Bold of you, but okay π-b,--keep-build-dirβ keeps the build directories after compiling packages. This is equivalent to setting$OPAMKEEPBUILDDIRto"true". Hoarder energy, but for builds.--build-docβ removed in 2.1, use--with-docinstead. She's retired bestie, let her rest πͺ¦--build-testβ removed in 2.1, use--with-testinstead. Same vibe, same retirement party.-d,--with-docβ builds the package documentation. This only affects packages listed on the command-line. This is equivalent to setting$OPAMWITHDOC(or the deprecated$OPAMBUILDDOC) to"true". Documentation girlies rise up πβ¨--dry-runβ simulates the command, but doesn't actually perform any changes. This also can be set with environment variable$OPAMDEBUG. Manifesting the install without committing to it π--fakeβ this option registers the actions into the opam database, <italics>without actually performing them</italics>.
π¨ WARNING: this option is dangerous and likely to break your opam environment. You probably want --dry-run. You've been warned.
Like, genuinely. It said what it said. π
--ignore-available-on[=PACKAGES](default=) β forces opam to mark the listed packages as available. This can be used to test compatibility, but expect builds to break when using this. Note that version constraints of the packages' dependencies are unaffected. Chaos testing, and I respect it π₯--ignore-constraints-on[=PACKAGES](default=) β forces opam to ignore version constraints on all dependencies to the listed packages. This can be used to test compatibility, but expect builds to break when using this. Note that availability of the packages as well as version constraints on optional dependencies and conflicts are unaffected. This is equivalent to setting$OPAMIGNORECONSTRAINTS. Freebirds only. π¦--inplace-buildβ when compiling a package which has its source bound to a local directory, process the build and install actions directly in that directory, rather than in a clean copy handled by opam. This only affects packages that are explicitly listed on the command-line. This is equivalent to setting$OPAMINPLACEBUILDto"true". Build in place, like a boss π-j JOBS,--jobs=JOBSβ set the maximal number of concurrent jobs to use. The default value is calculated from the number of cores. You can also set it using the$OPAMJOBSenvironment variable. Parallelism, periodt. β‘--lock-suffix=SUFFIX(absent=locked) β set locked files suffix toSUFFIX. Customise the little name-tag. π--lockedβ in commands that use opam files found from pinned sources, if a variant of the file with an added.lockedextension is found (e.g.foo.opam.lockedbesidesfoo.opam), that will be used instead. This is typically useful to offer a more specific set of dependencies and reproduce similar build contexts, hence the name. Thelockoption can be used to generate such files, based on the versions of the dependencies currently installed on the host. This is equivalent to setting the$OPAMLOCKEDenvironment variable. Note that this option doesn't generally affect already pinned packages. Locked in, literally π-m MAKE,--make=MAKEβ removed in 2.1, useopam config set[-global] make MAKEinstead. Gone but not forgotten πͺ¦--no-checksumsβ do not verify the checksum of downloaded archives. This is equivalent to setting$OPAMNOCHECKSUMSto"true". Living dangerously, no cap.--no-depextsβ temporarily disables handling of external dependencies. This can be used if a package is not available on your system package manager, but you installed the required dependency by hand. Implies--assume-depexts, and stores the exceptions upon success as well. DIY queen behaviour π--require-checksumsβ reject the installation of packages that don't provide a checksum forthe upstream archives. This is equivalent to setting$OPAMREQUIRECHECKSUMSto"true". Strict. Trust issues. Valid. π«Ά--reuse-build-dirβ reuse existing build directories (kept by using--keep-build-dir), instead of compiling from a fresh clone of the source. This can be faster, but also lead to failures if the build systems of the packages don't handle upgrades of dependencies well. This is equivalent to setting$OPAMREUSEBUILDDIRto"true". Speedrun strat, with a risk warning attached β οΈ--show-actionsβ call the solver and display the actions. Don't perform any changes. This is equivalent to setting$OPAMSHOW. Show me the receipts, no touching π--skip-updatesβ when running an install, upgrade or reinstall on source-pinned packages, they are normally updated from their origin first. This flag disables that behaviour and will keep them to their version in cache. This is equivalent to setting$OPAMSKIPUPDATE. Staying in your lane, keeping your cache. πΎ-t,--with-testβ build and run the package unit-tests. This only affects packages listed on the command-line. This is equivalent to setting$OPAMWITHTEST(or the deprecated$OPAMBUILDTEST) to"true". Test girlies, we love you π§ͺπ--unlock-baseβ removed in 2.1, use--update-invariantinstead. Another one for the archive.--update-invariantβ allow changes to the packages set as switch base (typically, the main compiler). Use with caution. This is equivalent to setting the$OPAMUNLOCKBASEenvironment variable. Big red button energy π¨--verbose-on=PACKAGESβ be more verbose on specific packages. This is equivalent to setting$OPAMVERBOSE. Spill the tea, in detail πΈ--with-dev-setupβ include development tools only dependencies. Dev tools besties get an invite too π οΈβ¨
and that's the first chunk bestie, keep scrolling, we're not done yet π
π COMMON OPTIONS π
okay bestie, these ones are the OGs β they work on every single command, no cap. β¨
--best-effortβ pls don't crash out if not every package you asked for can actually be installed. this says: just try to install as many as you can and vibe π. heads up though β not every external solver supports this (recent versions ofaspcudormccsshould, but iykyk). it's literally the same as setting the$OPAMBESTEFFORTenvironment variable.--cli=MAJOR.MINOR(absent=2.6) β use the command-line interface syntax and semantics from versionMAJOR.MINOR. this is for the girlies doing persistent opam stuff β scripts, blog posts, that kind of permanent slay. any version of opam in the sameMAJORseries will behave like theMINORrelease you specified. tiny caveat: this flag wasn't a thing back in opam 2.0, so if you wanna select the 2.0 CLI you have to set theOPAMCLIenvironment variable to2.0instead of using this parameter. periodt.--color=WHENβ colorize the output obvi π.WHENhas to be one ofalways,neverorauto.--confirm-level=LEVELβ set the confirmation level bestie.LEVELmust be one ofask,no,yesorunsafe-yes. you can pass this more than once. if--yesor--noare also given, whichever--confirm-levelcame last wins. this is equivalent to setting$OPAMCONFIRMLEVEL(yes the manpage has a stray backtick there, i'm keeping it fr π).--criteria=CRITERIAβ tell opam your β¨preferencesβ¨ for dependency solving, just for this one run. this overrides$OPAMCRITERIA,$OPAMFIXUPCRITERIAand$OPAMUPGRADECRITERIA. for the deets on the supported language and which external solvers exist, peek athttp://opam.ocaml.org/doc/External_solvers.html. and there's a whole general guide to using solver preferences athttp://www.dicosmo.org/Articles/usercriteria.pdf.--cudf=FILENAMEβ debug option π: saves the CUDF requests sent to the solver intoFILENAME-<n>.cudf, where<n>is the n-th call to the solver during the opam run.--debugβ print debug messages tostderr. equivalent to setting$OPAMDEBUGto"true".--debug-level=LEVELβ same energy as--debug, except you get to pick the debug level yourself (--debugjust sets it to1). equivalent to setting$OPAMDEBUGto a positive integer.--git-versionβ print the git version of opam if it's set (aka you're living that development-version life π) and then exit.--help[=FMT](default=auto) β show this help in formatFMT.FMTmust be one ofauto,pager,grofforplain. withauto, the format ends up beingpagerorplainwhenever theTERMenv var isdumbor just straight-up undefined.--ignore-pin-dependsβ ignore the extra pins that packages require when they get pinned β whether that's manually throughopam pinor throughopam install DIR. equivalent to settingIGNOREPINDEPENDS=true.--json=FILENAMEβ save the results of the opam run into a computer-readable file π€. if the filename contains the character%, it gets swapped out for an index that won't overwrite an existing file. similar to setting the$OPAMJSONvariable.--noβ answer no to literally all of opam's yes/no questions, no prompting, no hesitation π. see also--confirm-level. equivalent to setting$OPAMNOto"true".--no-aspcudβ removed in 2.1. rest in peace queen πͺ¦.--no-auto-upgradeβ when opam configures or updates a repository written for an earlier opam version (1.2), it internally converts it to the current format. this turns that behaviour off. important note bestie: repositories should declare their format version in a'repo'file at their root, otherwise they'll be assumed to be in the older format. and honestly? it's preferable in any case to upgrade the repositories manually withopam admin upgrade [--mirror URL]whenever you can.--no-self-upgradeβ by default opam will replace itself with a newer binary found atOPAMROOT/opamif one's there (main character energy, honestly). this disables that behaviour.-q,--quietβ disables--verbose.--root=ROOTβ useROOTas the current root path. equivalent to setting$OPAMROOTtoROOT.--safe,--readonlyβ make absolutely sure nothing gets automatically updated or rewritten π. super useful when you're calling from completion scripts for example. it will fail whenever such an operation is actually needed; it also skips waiting for locks, skips interactive questions, and overrides the$OPAMDEBUGvariable. equivalent to setting the$OPAMSAFEenvironment variable.--solver=CMDβ pick the CUDF solver used for resolving package installation problems.CMDis either a predefined solver β and this version of opam supportsbuiltin-mccs+lp(),builtin-mccs+glpk,builtin-dummy-z3-solver,builtin-0install,aspcud,mccs,aspcud-old,packupβ or a custom command that should contain the variables%{input}%,%{output}%,%{criteria}%, and optionally%{timeout}%. equivalent to setting$OPAMEXTERNALSOLVER.--strictβ fail whenever an error turns up in a package definition or a configuration file. the default is to just keep going silently if possible π€«.--switch=SWITCHβ useSWITCHas the current compiler switch. equivalent to setting$OPAMSWITCHtoSWITCH.--use-internal-solverβ disable any external solver and use the built-in one instead (heads up: this requires that opam was compiled with a built-in solver). equivalent to setting$OPAMNOASPCUDor$OPAMUSEINTERNALSOLVER.-v,--verboseβ be more verbose π£οΈ. one-vshows all package commands; repeat it to also display commands called internally (thinktar,curl,patchetc.). repeating it n times is equivalent to setting$OPAMVERBOSEto"n".--versionβ show version information. iconic, short, does exactly what it says π.-w,--working-dirβ whenever opam updates packages that are bound to a local, version-controlled directory, this updates them to the current working state of their source instead of the last committed state, or the ref they're pointing to. β οΈ heads up: since the source directory gets copied as-is, if it isn't clean it may result in an opam build failure. this only affects packages explicitly listed on the command line. it can also be set with$OPAMWORKINGDIR.-y,--yesβ answer yes to all of opam's yes/no questions without prompting. so efficient, so slay β¨. see also--confirm-level. equivalent to setting$OPAMYESto"true".
πΈ ENVIRONMENT πΈ
okay so bestie, opam is lowkey reading your environment the whole time π it makes use of the environment variables listed right here, and you should absolutely know about them because they're your secret little levers ποΈβ¨
one thing first: the boolean ones? they should be set to "0", "no", "false" or the empty string to disable them, and "1", "yes" or "true" to enable them. no cap, that's the whole rule π«Ά
THE FULL LIST π
OPAMALLPARENSβ surrounds all filters with parenthesis. like, every single one, all wrapped up πOPAMASSUMEDEPEXTSβ see option--assume-depexts.OPAMAUTOANSWERβ internal use only. not for you, bestie πOPAMAUTOREMOVEβ see the remove option--auto-remove.OPAMBESTEFFORTβ see option--best-effort.OPAMBESTEFFORTPREFIXCRITERIAβ sets the string that must be prepended to the criteria when the--best-effortoption is set, and it's expected to maximise theopam-queryproperty in the solution πOPAMBUILDDOCβ Removed in 2.1. she's gone, periodt πOPAMBUILDTESTβ Removed in 2.1. also gone πͺ¦OPAMCLIβ see option--cli.OPAMCOLORβ when set toalwaysornever, it sets a default value for the--coloroption πOPAMCONFIRMLEVELβ see option--confirm-level. heads up: OPAMCONFIRMLEVEL has priority over OPAMYES and OPAMNO πOPAMCRITERIAβ specifies user preferences for dependency solving. the default value depends on the solver version, so useconfig reportto know the current setting. see also option--criteria.OPAMCUDFFILEβ save the cudf graph to file-actions-explicit.dot.OPAMCUDFTRIMβ controls the filtering of unrelated packages during CUDF preprocessing.OPAMCURLβ can be used to select a given 'curl' program. see OPAMFETCH for more options.OPAMDEBUGβ see options--debugand--debug-level.OPAMDEBUGSECTIONSβ if set, it limits debug messages to the space-separated list of sections. sections can optionally have a specific debug level (for example,CLIENT:2orCLIENT CUDF:2), but otherwise use--debug-level.OPAMDIGDEPTHβ defines how aggressive the lookup for conflicts during CUDF preprocessing is. go big or go home π΅οΈOPAMDOWNLOADJOBSβ sets the maximum number of simultaneous downloads. parallel queen behaviour β¨OPAMDROPWORKINGDIRβ overrides packages previously updated with--working-diron update. without this variable set, opam would keep them unchanged unless they're explicitly named on the command-line.OPAMDRYRUNβ see option--dry-run.OPAMEDITORβ sets the editor to use for opam file editing, and it overrides$EDITORand$VISUAL. main character energy only π§OPAMERRLOGLENβ sets the number of log lines printed when a sub-process fails.0to print all of them.OPAMEXTERNALSOLVERβ see option--solver.OPAMFAKEβ see option--fake.OPAMFETCHβ specifies how to download files: eitherwget,curlor a custom command where the variables%{url}%,%{out}%,%{retry}%,%{compress}%and%{checksum}%will be replaced. this overrides the 'download-command' value from the main config file.OPAMFIXUPCRITERIAβ same as OPAMUPGRADECRITERIA, but specific to fixup and reinstall.OPAMIGNOREAVAILABLEβ see install option--ignore-available-on.OPAMIGNORECONSTRAINTSβ see install option--ignore-constraints-on.OPAMIGNOREPINDEPENDSβ see option--ignore-pin-depends.OPAMINPLACEBUILDβ see option--inplace-build.OPAMJOBSβ sets the maximum number of parallel workers to run. multitasking icon πOPAMJSONβ log json output to the given file (use the character%to index the files).OPAMKEEPBUILDDIRβ see install option--keep-build-dir.OPAMKEEPLOGSβ tells opam to not remove some temporary command logs and some backups. this skips some finalisers and may also help to get more reliable backtraces πOPAMLOCKEDβ a combination of--lockedand--lock-suffixoptions.OPAMLOGSβ logdir sets the log directory, and the default is a temporary directory in/tmp.OPAMMAKECMDβ set the system make command to use.OPAMMERGEOUTβ merge process outputs, with stderr on stdout.OPAMNOβ answers no to any question asked, see options--noand--confirm-level. OPAMNO is ignored if either OPAMCONFIRMLEVEL or OPAMYES is set πOPAMNOAGGREGATEβ withopam admin check, don't aggregate packages.OPAMNOASPCUDβ Deprecated. hard pass, bestie.OPAMNOAUTOUPGRADEβ disables automatic internal upgrade of repositories in an earlier format to the current one, on 'update' or 'init'.OPAMNOCHECKSUMSβ enables option--no-checksumswhen available.OPAMNODEPEXTSβ disables system dependencies handling, see option--no-depexts.OPAMNOENVNOTICEβ Internal. nothing to see here πOPAMNOSELFUPGRADEβ see option--no-self-upgrade.OPAMPINKINDAUTOβ sets whether version control systems should be detected when pinning to a local path. enabled by default since 1.3.0 πOPAMPRECISETRACKINGβ fine grain tracking of directories.OPAMPREPROβ set this to false to disable CUDF preprocessing. less efficient, but it might help debugging solver issues πOPAMREPOSITORYTARRINGβ internally store all non-vcs repositories as tar.gz files (by default, http repositories are stored as archive). this can be much faster on filesystems that don't cope well with scanning large trees. all operations are done in-memory, no I/O for scanning the repository. ok that's actually so smart π§ β¨OPAMREQUIRECHECKSUMSβ enables option--require-checksumswhen available (e.g. foropam install).OPAMRETRIESβ sets the number of tries before failing downloads. manifesting a successful download πOPAMREUSEBUILDDIRβ see option--reuse-build-dir.OPAMROOTβ see option--root. this is automatically set byopam env --root=DIR --set-root.OPAMROOTISOKβ don't complain when running as root. you do you, bestie πOPAMSAFEβ see option--safe.OPAMSHOWβ see option--show.OPAMSKIPUPDATEβ see option--skip-updates.OPAMSKIPVERSIONCHECKSβ bypasses some version checks. Unsafe, for compatibility testing only π¨OPAMSOLVERALLOWSUBOPTIMALβ (defaulttrue) allows some solvers to still return a solution when they reach timeout; while the solution remains assured to be consistent, there is no guarantee in this case that it fits the expected optimisation criteria. iftrue, opam will continue with a warning, iffalsea timeout is an error. currently only the builtin-z3 backend handles this degraded case.OPAMSOLVERTIMEOUTβ change the time allowance of the solver. default is60.0, set to0for unlimited. note that all solvers may not support this option β³OPAMSOLVERTOLERANCEβ changes the tolerance towards the solver choosing an unoptimized solution (i.e. might pull outdated packages). typical values range from0.0(best solution known to the solver) to1.0(unoptimized solution). default is0.0. this option is useful in case the solver can't find a solution in a reasonable time (see$OPAMSOLVERTIMEOUT). note that all solvers may not support this option.OPAMSTATSβ Removed in 2.4. rest in peace πͺ¦OPAMSTATUSLINEβ display a dynamic status line showing what's currently going on on the terminal. (one ofalways,neverorauto)OPAMSTRICTβ fail on inconsistencies (file reading, switch import, etc.). no sloppy vibes allowed π«OPAMSWITCHβ see option--switch. automatically set byopam env --switch=SWITCH --set-switch.OPAMUNLOCKBASEβ see install option--unlock-base.OPAMUPGRADECRITERIAβ specifies user preferences for dependency solving when performing an upgrade. it overrides OPAMCRITERIA in upgrades if both are set. see also option--criteria.OPAMUSEINTERNALSOLVERβ see option--use-internal-solver.OPAMUSEOPENSSLβ Removed in 2.2. bye babe πOPAMUTF8β use UTF8 characters in output (one ofalways,neverorauto). by default it'sauto, which is determined from the locale π¦OPAMUTF8MSGSβ use extended UTF8 characters (camels πͺ) in opam messages. it implies OPAMUTF8. this is set by default on macOS only.OPAMVALIDATIONHOOKβ if set, uses the%{hook}%command to validate an opam repository update.OPAMVERBOSEβ see option--verbose.OPAMVERBOSEONβ see option--verbose-on.OPAMVERSIONLAGPOWERβ do not use. literally just don't πOPAMWITHDEVSETUPβ see install option--with-dev-setup.OPAMWITHDOCβ see install option--with-doc.OPAMWITHTESTβ see install option--with-test.OPAMWORKINGDIRβ see option--working-dir.OPAMYESβ see options--yesand--confirm-level. OPAMYES has priority over OPAMNO and is ignored if OPAMCONFIRMLEVEL is set. yes queen, say yes to everything β¨OPAMVAR_varβ overrides the contents of the variable var when substituting%{var}%strings inopamfiles.OPAMVAR_package_varβ overrides the contents of the variable package:var when substituting%{package:var}%strings inopamfiles.
π CLI VERSION π
okay this one is actually important for the girlies writing scripts, so listen up π’
all scripts and programmatic invocations of opam should use --cli in order to ensure that they work seamlessly with future versions of the opam client. and not just scripts β blog posts or other documentation can benefit too, because it prevents information from becoming stale. the way that future-proofing π«Ά
although opam only supports roots (~/.opam/) for the current version, it does provide backwards compatibility for its command-line interface. slay π
since CLI version support was only added in opam 2.1, use OPAMCLI to select 2.0 support (as opam 2.0 will just ignore it), and --cli=2.1 for 2.1 (or later) versions, since an environment variable controlling the parsing of syntax is brittle. to this end, opam displays a warning if OPAMCLI specifies a valid version other than 2.0, and also if --cli=2.0 is specified. so yeah, you'll get called out β οΈ
the command-line version is selected by using the --cli option or the OPAMCLI environment variable. --cli may be specified more than once, where the last instance takes precedence π OPAMCLI is only inspected if --cli is not given.
π EXIT STATUS
ok so this is the part where opam tells you how it's feeling, in numbers. Every code is a whole mood and honestly you're gonna want to know these by heart, bestie.
β οΈ one exception first, don't skip this: theexeccommand breaks the pattern. It returns127if the command wasn't found or couldn't be executed, and otherwise it just hands you back the command's own exit value. That's it, that's the whole exception. β¨
Here's the lineup:
0β Success, ortruefor boolean queries. everything's giving immaculate vibes π1βFalse. Comes back when a boolean return value is expected, like when you run with--check, or for queries such asopam lint.2β Bad command-line arguments, or command-line args pointing at an invalid context (e.g. a file that doesn't follow the expected format). not the vibe π5β Not found. You asked for something (package, version, repository, etc.) that couldn't be found. it's giving "who is she"10β Aborted. The operation needed confirmation, and you didn't give it.15β Could not acquire the locks required for the operation. π20β There is no solution to the user request. This can happen if you ask to install two incompatible packages, for example. lowkey heartbreaking π30β Error in package definition, or other metadata files. Using--strictraises this error more often. she's picky, and honestly? valid.31β Package script error. Some package operations were unsuccessful. This may be an error in the packages or an incompatibility with your system. This can be a partial error.40β Sync error. Could not fetch some remotes from the network. This can be a partial error too.50β Configuration error. Opam or system configuration doesn't allow the operation, and it needs fixing.60β Solver failure. The solver failed to return a sound answer. It can be due to a broken external solver, or an error in solver configuration.99β Internal error. Something went wrong, and it's likely a bug in opam itself. π main character bug energy, but like, the bad kind.130β User interrupt.SIGINTwas received, generally because you pressed Ctrl+C. not me panicking and mashing keys π
and then the page also drops this little squad of numbers, right at the end, exactly like this:
0β on success.123β on indiscriminate errors reported on standard error.124β on command line parsing errors.125β on unexpected internal errors (bugs).
periodt. memorize them, screenshot them, put them in your notes app. future you says thank you. πβ¨
π FURTHER DOCUMENTATION
the lore continues at https://opam.ocaml.org/doc. go read, bestie, it's giving homework but make it cute. π¦
π AUTHORS
these are the literal icons who built this. absolute legends, every single one:
- David Allsopp β
david@tarides.com - Vincent Bernardoff β
vb@luminar.eu.org - Raja Boujbel β
raja.boujbel@ocamlpro.com - Kate Deplaix β
kit-ty-kate@exn.st - Roberto Di Cosmo β
roberto@dicosmo.org - Thomas Gazagnaire β
thomas@gazagnaire.org - Louis Gesbert β
louis.gesbert@ocamlpro.com - Fabrice Le Fessant β
Fabrice.Le_fessant@inria.fr - Anil Madhavapeddy β
anil@recoil.org - Guillem Rieu β
guillem.rieu@ocamlpro.com - Ralf Treinen β
ralf.treinen@pps.jussieu.fr - Frederic Tuong β
tuong@users.gforge.inria.fr
no cap, round of applause π«ΆπΈ
π SEE ALSO
π BUGS
found something cursed? check the bug reports at https://github.com/ocaml/opam/issues. spilling the tea responsibly is self care. π
ok that's the WHOLE page bestie, you made it to the end, we're both so proud of you πβ¨ one last thing: the footer of this page says Opam 2.6.1 on one side and OPAM-INSTALL(1) on the other, and the date slot is just sitting there empty like π β so if you're ever citing this, that's the version you're reading, and that's the section name. now go run opam install something iconic and text me how it goes π
π₯π
π¦ where this page comes from
- arch rolling: opam 2.6.1-1 Β· LGPL-2.1-only
- fedora 44: opam 2.6.1-1.fc44 Β· LGPL-2.1-only WITH OCaml-LGPL-linking-exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms