opam install --help

Contents

Menu

OPAM-INSTALL(1)                   Opam Manual                  OPAM-INSTALL(1)



NNAAMMEE
       opam-install - Install a list of packages.

SSYYNNOOPPSSIISS
       ooppaamm iinnssttaallll [_O_P_T_I_O_N]... _P_A_C_K_A_G_E_S...

DDEESSCCRRIIPPTTIIOONN
       This command installs one or more packages to the currently selected
       compiler. To install packages for another compiler, you need to switch
       compilers using ooppaamm sswwiittcchh. You can remove installed packages with
       ooppaamm rreemmoovvee, and list installed packages with ooppaamm lliisstt --ii. See ooppaamm
       ppiinn as well to understand how to manage package versions.

       This command makes OPAM use the dependency solver to compute the
       transitive closure of dependencies to be installed, and will also
       handle conflicts. If the dependency solver returns more than one
       solution, OPAM will arbitrarily select the first one. If dependencies
       are to be installed, OPAM will confirm if the installation should
       proceed.

AARRGGUUMMEENNTTSS
       _P_A_C_K_A_G_E_S
           List of package names, with an optional version or constraint, e.g
           `pkg', `pkg.1.0' or `pkg>=0.5'.

OOPPTTIIOONNSS
       --bb, ----kkeeeepp--bbuuiilldd--ddiirr
           Keep the build directory. This is equivalent to setting
           $$OOPPAAMMKKEEEEPPBBUUIILLDDDDIIRR to "true".

       --dd, ----bbuuiilldd--ddoocc
           Build the package documentation. This is equivalent to setting
           $$OOPPAAMMBBUUIILLDDDDOOCC to "true".

       ----ddeeppss--oonnllyy
           Install all its dependencies, but don't actually install the
           package.

       ----ddrryy--rruunn
           Simulate the command, but don't actually perform any changes.

       --ee _T_A_G_S, ----eexxtteerrnnaall=_T_A_G_S
           Display the external packages associated to the given tags. This is
           deprecated, use `opam list --external' instead

       ----ffaakkee
           This option registers the actions into the OPAM database, without
           actually performing them. WARNING: This option is dangerous and
           likely to break your OPAM environment. You probably want
           `--dry-run'. You've been warned.

       --jj _J_O_B_S, ----jjoobbss=_J_O_B_S
           Set the maximal number of concurrent jobs to use. You can also set
           it using the $$OOPPAAMMJJOOBBSS environment variable.

       ----jjssoonn=_F_I_L_E_N_A_M_E
           Save the result output of an OPAM run in a computer-readable file

       --mm _M_A_K_E, ----mmaakkee=_M_A_K_E
           Use _M_A_K_E as the default 'make' command.

       ----nnoo--cchheecckkssuummss
           Do not verify the checksum of downloaded archives.This is
           equivalent to setting $$OOPPAAMMNNOOCCHHEECCKKSSUUMMSS to "true".

       ----rreeqquuiirree--cchheecckkssuummss
           Reject the installation of packages that don't provide a checksum
           for the upstream archives. This is equivalent to setting
           $$OOPPAAMMRREEQQUUIIRREECCHHEECCKKSSUUMMSS to "true".

       ----sseett--rroooott
           Mark given packages as installed roots. This is the default for
           newly manually-installed packages.

       ----sshhooww--aaccttiioonnss
           Call the solver and display the actions. Don't perform any changes.

       --tt, ----bbuuiilldd--tteesstt
           Build and rruunn the package unit-tests. This is equivalent to setting
           $$OOPPAAMMBBUUIILLDDTTEESSTT to "true".

       ----uunnsseett--rroooott
           Mark given packages as "installed automatically".

CCOOMMMMOONN OOPPTTIIOONNSS
       These options are common to all commands.

       ----ccoolloorr=_W_H_E_N (absent=auto)
           Colorize the output. _W_H_E_N must be one of `always', `never' or
           `auto'.

       ----ccrriitteerriiaa=_C_R_I_T_E_R_I_A
           Specify user _p_r_e_f_e_r_e_n_c_e_s for dependency solving for this run.
           Overrides both $$OOPPAAMMCCRRIITTEERRIIAA and $$OOPPAAMMUUPPGGRRAADDEECCRRIITTEERRIIAA. For details
           on the supported language, and the external solvers available, see
           _h_t_t_p_:_/_/_o_p_a_m_._o_c_a_m_l_._o_r_g_/_d_o_c_/_S_p_e_c_i_f_y_i_n_g___S_o_l_v_e_r___P_r_e_f_e_r_e_n_c_e_s_._h_t_m_l. A
           general guide to using solver preferences can be found at
           _h_t_t_p_:_/_/_w_w_w_._d_i_c_o_s_m_o_._o_r_g_/_A_r_t_i_c_l_e_s_/_u_s_e_r_c_r_i_t_e_r_i_a_._p_d_f. The default value
           is
           -count(down),-count(removed),-notuptodate(solution),-sum(solution,version-lag),-count(new)
           for upgrades, and
           -count(removed),-notuptodate(request),-sum(request,version-lag),-count(down),-notuptodate(changed),-count(changed),-notuptodate(solution),-sum(solution,version-lag)
           otherwise.

       ----ccuuddff=_F_I_L_E_N_A_M_E
           Debug option: Save the CUDF requests sent to the solver to
           _F_I_L_E_N_A_M_E-<n>.cudf.

       ----ddeebbuugg
           Print debug message to stderr. This is equivalent to setting
           $$OOPPAAMMDDEEBBUUGG to "true".

       ----ddeebbuugg--lleevveell=_L_E_V_E_L
           Like `--debug', but allows specifying the debug level (`--debug'
           sets it to 1). Equivalent to setting $$OOPPAAMMDDEEBBUUGG to a positive
           integer.

       ----ggiitt--vveerrssiioonn
           Print the git version if it exists and exit.

       ----hheellpp[=_F_M_T] (default=pager)
           Show this help in format _F_M_T (pager, plain or groff).

       ----nnoo--bbaassee--ppaacckkaaggeess
           Do not install base packages (useful for testing purposes). This is
           equivalent to setting $$OOPPAAMMNNOOBBAASSEEPPAACCKKAAGGEESS to a non-empty string.

       ----nnoo--sseellff--uuppggrraaddee
           OPAM will replace itself with a newer binary found at OOPPAAMMRROOOOTT//ooppaamm
           if present. This disables this behaviour.

       --qq, ----qquuiieett
           Be quiet when installing a new compiler.

       ----rroooott=_R_O_O_T (absent=~/.opam)
           Use _R_O_O_T as the current root path. This is equivalent to setting
           $$OOPPAAMMRROOOOTT to _R_O_O_T.

       ----ssaaffee
           Make sure nothing will be automatically updated or rewritten.
           Useful for calling from completion scripts, for example. Will fail
           whenever such an operation is needed ; also avoids waiting for
           locks, skips interactive questions and overrides the OPAMDEBUG
           variable.

       ----ssoollvveerr=_C_M_D
           Specify the name of the external dependency _s_o_l_v_e_r. The default
           value is aspcud. Either 'aspcud', 'packup' or a custom command that
           may contain the variables %{input}%, %{output}% and %{criteria}%

       ----ssttrriicctt
           Fail whenever an error is found in a package definition or a
           configuration file. The default is to continue silently if
           possible.

       ----sswwiittcchh=_S_W_I_T_C_H
           Use _S_W_I_T_C_H as the current compiler switch. This is equivalent to
           setting $$OOPPAAMMSSWWIITTCCHH to _S_W_I_T_C_H.

       ----uussee--iinntteerrnnaall--ssoollvveerr, ----nnoo--aassppccuudd
           Force use of internal heuristics, even if an external solver is
           available.

       --vv, ----vveerrbboossee
           Be more verbose, show package sub-commands and their output. Repeat
           to see more. Repeating _n times is equivalent to setting
           $$OOPPAAMMVVEERRBBOOSSEE to "_n".

       ----vveerrssiioonn
           Show version information.

       --yy, ----yyeess
           Disable interactive mode and answer yes to all questions that would
           otherwise be asked to the user. This is equivalent to setting
           $$OOPPAAMMYYEESS to "true".

EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
       OPAM makes use of the environment variables listed here. Boolean
       variables should be set to "0", "no" of "false" to disable, "1", "yes"
       or "true" to enable.

       _O_P_A_M_C_O_L_O_R, when set to _a_l_w_a_y_s or _n_e_v_e_r, sets a default value for the
       --color option.

       _O_P_A_M_C_R_I_T_E_R_I_A specifies user _p_r_e_f_e_r_e_n_c_e_s for dependency solving.The
       default value is
       -count(removed),-notuptodate(request),-sum(request,version-lag),-count(down),-notuptodate(changed),-count(changed),-notuptodate(solution),-sum(solution,version-lag).
       See also option --criteria

       _O_P_A_M_C_U_R_L can be used to select a given 'curl' program. See _O_P_A_M_F_E_T_C_H
       for more options.

       _O_P_A_M_D_E_B_U_G see options `--debug' and `--debug-level'.

       _O_P_A_M_D_O_W_N_L_O_A_D_J_O_B_S sets the maximum number of simultaneous downloads.

       _O_P_A_M_E_X_T_E_R_N_A_L_S_O_L_V_E_R see option `--solver'.

       _O_P_A_M_F_E_T_C_H specifies how to download files: either `wget', `curl' or a
       custom command where variables %%{{uurrll}}%%, %%{{oouutt}}%%, %%{{rreettrriieess}}%%,
       %%{{ccoommpprreessss}}%% and %%{{cchheecckkssuumm}}%% will be replaced. Overrides the
       'download-command' value from the main config file.

       _O_P_A_M_J_O_B_S sets the maximum number of parallel workers to run.

       _O_P_A_M_L_O_C_K_R_E_T_R_I_E_S sets the number of tries after which OPAM gives up
       acquiring its lock and fails. <= 0 means infinite wait.

       _O_P_A_M_N_O answer no to any question asked.

       _O_P_A_M_N_O_A_S_P_C_U_D see option `--no-aspcud'.

       _O_P_A_M_N_O_S_E_L_F_U_P_G_R_A_D_E see option `--no-self-upgrade'.

       _O_P_A_M_P_I_N_K_I_N_D_A_U_T_O if set, version control systems are detected when
       pinning to a local path.

       _O_P_A_M_R_E_Q_U_I_R_E_C_H_E_C_K_S_U_M_S see option `--require-checksums'.

       _O_P_A_M_R_E_T_R_Y sets the number of tries before failing downloads.

       _O_P_A_M_R_O_O_T see option `--root'. This is automatically set by `opam config
       env --root=DIR' when DIR is non-default or OPAMROOT is already defined.

       _O_P_A_M_S_A_F_E see option `--safe'

       _O_P_A_M_S_K_I_P_V_E_R_S_I_O_N_C_H_E_C_K_S bypasses some version checks. Unsafe, for
       compatibility testing only.

       _O_P_A_M_S_O_L_V_E_R_T_I_M_E_O_U_T change the time allowance of the internal solver.

       _O_P_A_M_S_T_A_T_U_S_L_I_N_E display a dynamic status line showing what's currently
       going on on the terminal. (one of one of `always', `never' or `auto')

       _O_P_A_M_S_W_I_T_C_H see option `--switch'. Automatically set by `opam config env
       --switch=SWITCH'.

       _O_P_A_M_U_P_G_R_A_D_E_C_R_I_T_E_R_I_A specifies user _p_r_e_f_e_r_e_n_c_e_s for dependency solving
       when performing an upgrade. Overrides _O_P_A_M_C_R_I_T_E_R_I_A in upgrades if both
       are set.The default value is
       -count(down),-count(removed),-notuptodate(solution),-sum(solution,version-lag),-count(new).
       See also option --criteria

       _O_P_A_M_U_S_E_I_N_T_E_R_N_A_L_S_O_L_V_E_R see option `--use-internal-solver'.

       _O_P_A_M_U_T_F_8 use UTF8 characters in output (one of one of `always', `never'
       or `auto'). By default `auto', which is determined from the locale).

       _O_P_A_M_U_T_F_8_M_S_G_S use extended UTF8 characters (camels) in OPAM messages.
       Implies _O_P_A_M_U_T_F_8. This is set by default on OSX only.

       _O_P_A_M_V_A_R___v_a_r overrides the contents of the variable _v_a_r when
       substituting `%{var}%` strings in `opam` files.

       _O_P_A_M_V_A_R___p_a_c_k_a_g_e___v_a_r overrides the contents of the variable _p_a_c_k_a_g_e_:_v_a_r
       when substituting `%{package:var}%` strings in `opam` files.

       _O_P_A_M_V_E_R_B_O_S_E see option `--verbose'.

       _O_P_A_M_Y_E_S see option `--yes'.

FFUURRTTHHEERR DDOOCCUUMMEENNTTAATTIIOONN
       See https://opam.ocaml.org.

AAUUTTHHOORRSS
       Thomas Gazagnaire <thomas@gazagnaire.org>
       Anil Madhavapeddy <anil@recoil.org>
       Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
       Frederic Tuong <tuong@users.gforge.inria.fr>
       Louis Gesbert <louis.gesbert@ocamlpro.com>
       Vincent Bernardoff <vb@luminar.eu.org>
       Guillem Rieu <guillem.rieu@ocamlpro.com>
       Roberto Di Cosmo <roberto@dicosmo.org>

BBUUGGSS
       Check bug reports at https://github.com/ocaml/opam/issues.



Opam 1.2.2                                                     OPAM-INSTALL(1)