macOS
brew install opamlocal Homebrew formula metadata
sudo port install opamMacPorts ports tree · ocaml/opam/Portfile · 来源: api.github.com
安装
brew install opamlocal Homebrew formula metadata
sudo port install opamMacPorts ports tree · ocaml/opam/Portfile · 来源: api.github.com
sudo apk add opamAlpine Linux edge package indexes · opam · 来源: dl-cdn.alpinelinux.org
sudo dnf install opamFedora Rawhide package metadata · opam · 来源: dl.fedoraproject.org
nix profile install nixpkgs#opamnixpkgs package indexes · opam · 来源: raw.githubusercontent.com
sudo pacman -S opamArch Linux sync databases · opam · 来源: geo.mirror.pkgbuild.com
sudo zypper install opamopenSUSE Tumbleweed package metadata · opam · 来源: download.opensuse.org
scoop install main/opamScoop official bucket manifest trees · bucket/opam.json · 来源: api.github.com
winget install --id OCaml.opam -eWindows Package Manager source index · OCaml.opam · 来源: cdn.winget.microsoft.com
概览
OCaml package manager
历史
opam is the source-based package manager for OCaml. It manages compiler switches, package constraints, solver-backed dependency resolution, and a Git-friendly development workflow, making it both the OCaml ecosystem's package index client and a practical compiler-environment manager.
The opam history published by the project traces the work to OCamlPro and the wider OCaml community in 2012. Thomas Gazagnaire pushed the first public commit in February 2012; constraint-solving work from Roberto Di Cosmo and Pietro Abate helped connect opam with Mancoosi tools such as CUDF and dose; and documentation and website work followed before the public beta.
The first public beta appeared in January 2013, and opam 1.0.0 was announced on March 15, 2013. The 1.0 release added an auto-configuration tool around opam init, shell completion, toplevel script loading, and related setup tasks, which lowered the cost of getting a usable OCaml environment.
The project quickly became more than a package installer. It standardized switch-based OCaml compiler management, package descriptions, solver integration, and repository workflows in a language ecosystem where compiler versions and native dependencies often matter as much as library versions.
Mirage began using opam in June 2012 for custom compiler needs, and the opam-repository grew through community package submissions. Jane Street's Core libraries appeared in the repository in July 2012, Travis CI was integrated into pull-request processing in September 2013, and contributors were contacted in 2013 to relicense repository contributions to CC0 for the move to the ocaml organization.
The package metadata in this batch records opam across many OS package managers, including Alpine, Homebrew, Debian, Fedora, MacPorts, Nix, Arch, Scoop, Ubuntu, WinGet, and openSUSE. That broad packaging footprint reflects opam's role as the expected bootstrap tool for OCaml development across Unix, macOS, and Windows-oriented environments.
Developers use opam to install OCaml compilers and libraries, create and switch between isolated compiler environments, update package metadata, upgrade installed packages, pin packages from local or remote sources, and reproduce project dependency sets. The homepage's basic workflow is list, install, update, and upgrade; day-to-day OCaml work adds switches and project-local package constraints.
Operators and distribution maintainers care about opam because it bridges source builds, solver constraints, compiler variants, and external system packages. A package can be available in opam while still depending on native libraries provided by Homebrew, apt, pacman, or another host package manager.
opam is one of the cleaner examples of a language package manager that also manages language runtimes. Its switch model makes compiler selection explicit, and its repository model gives OCaml packages machine-readable metadata while keeping the package index in Git.
For package nerds, opam is important because it makes the hard part visible: OCaml package installation is not just downloading archives, but solving constraints across compiler versions, library packages, build tools, and external dependencies. That is why opam sits naturally in both developer-tools and dependency-management categories.
安全态势
infrastructure mutation or orchestration signal.
orange 风险 · 中 置信度 · infrastructure
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
~/.opam/config~/.opamrc/etc/opamrc可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
opam | cli | 全局可执行文件 | |
opam-installer | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
安装元数据
| 软件包键 | brew:opam |
|---|---|
| 版本 | 2.5.2 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/opam |
| 主页 | https://opam.ocaml.org |
| 仓库 | https://github.com/ocaml/opam |
| 上游文档 | https://github.com/ocaml/opam#readme |
| 许可证 | LGPL-2.1-only |
| 源码归档 | https://github.com/ocaml/opam/releases/download/2.5.2/opam-full-2.5.2.tar.gz |
| 最后更新 | 2026-07-09T14:24:15Z |
| Pulse | updated |
| 依赖 | rsync |
| 构建依赖 | ocaml |
| macOS 提供的库 | unzip |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
| 注意事项 | OPAM uses ~/.opam by default for its package database, so you need to initialize it first by running: $ opam init |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | opam |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
opam 2.3.0-1+deb13u1
package manager for OCaml
sudo apt install opamopam-doc 2.3.0-1+deb13u1
package manager for OCaml (documentation)
sudo apt install opam-docopam-installer 2.3.0-1+deb13u1
Utility handling (un)installation of Opam .install files
sudo apt install opam-installeropam
nix profile install nixpkgs#opamopam 2.1.5-1
package manager for OCaml
sudo apt install opamopam-doc 2.1.5-1
package manager for OCaml (documentation)
sudo apt install opam-docopam-installer 2.1.5-1
Utility handling (un)installation of Opam .install files
sudo apt install opam-installeropam 2.5.1-r0
OCaml Package Manager
sudo apk add opamopam-doc 2.5.1-r0
OCaml Package Manager (documentation)
sudo apk add opam-docopam 2.5.1-1.fc45
Source-based package manager for OCaml
sudo dnf install opamopam-installer 2.5.1-1.fc45
Standalone script for opam install files
sudo dnf install opam-installeropam 2.5.1-1
OCaml package manager
sudo pacman -S opamopam 2.5.1-1.2
Source-based package manager for OCaml
sudo zypper install opamopam-devel 2.5.1-1.2
Development files for opam
sudo zypper install opam-developam-installer 2.5.1-1.2
Standalone tool for opam install files
sudo zypper install opam-installeropam
sudo port install opam来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.