# 安装 ocaml

查看 ocaml 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:ocaml
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install ocaml
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ocaml
```

  证据: MacPorts ports tree: lang/ocaml/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add ocaml
```

  证据: Alpine Linux edge package indexes: ocaml from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install ocaml
```

  证据: Debian stable package indexes: ocaml from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install ocaml
```

  证据: Fedora Rawhide package metadata: ocaml from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/13ee7b80cb813542594d4235c4a0b8695435d5ecf23dd3580bc7515ae1b6180d-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#ocaml
```

  证据: nixpkgs package indexes: ocaml from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S ocaml
```

  证据: Arch Linux sync databases: ocaml from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install ocaml
```

  证据: openSUSE Tumbleweed package metadata: ocaml from https://download.opensuse.org/tumbleweed/repo/oss/repodata/155b97171d05e27afd950b6fe0d55513ff38f4597110664535bceedc680bbe6fd459f0733718dcc21dcf0efc7c8250fd1390c73d4790b42e62fb2c16a87242e5-primary.xml.zst

## 软件包事实

- **软件包键:** brew:ocaml
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/ocaml>
- **版本:** 5.4.1
- **来源摘要:** General purpose programming language in the ML family
- **主页:** <https://ocaml.org/>
- **上游文档:** <https://ocaml.org/>
- **许可证:** LGPL-2.1-only WITH OCaml-LGPL-linking-exception
- **源码归档:** <https://caml.inria.fr/pub/distrib/ocaml-5.4/ocaml-5.4.1.tar.xz>
- **更新:** 2026-03-22T03:32:09Z
- **生成来源:** 2026-05-26T22:45:13+00:00

## 可执行文件

- ocaml (cli)
- ocamlc (cli)
- ocamlc.byte (cli)
- ocamlc.opt (cli)
- ocamlcmt (cli)
- ocamlcp (cli)
- ocamldebug (cli)
- ocamldep (cli)
- ocamldep.byte (cli)
- ocamldep.opt (cli)
- ocamldoc (cli)
- ocamldoc.opt (cli)
- ocamllex (cli)
- ocamllex.byte (cli)
- ocamllex.opt (cli)
- ocamlmklib (cli)
- ocamlmktop (cli)
- ocamlobjinfo (cli)
- ocamlobjinfo.byte (cli)
- ocamlobjinfo.opt (cli)
- ocamlopt (cli)
- ocamlopt.byte (cli)
- ocamlopt.opt (cli)
- ocamloptp (cli)
- ocamlprof (cli)
- ocamlrun (cli)
- ocamlrund (cli)
- ocamlruni (cli)
- ocamlyacc (cli)
- ocaml (别名)
- ocamlc (别名)
- ocamlc.byte (别名)
- ocamlc.opt (别名)
- ocamlcmt (别名)
- ocamlcp (别名)
- ocamldebug (别名)
- ocamldep (别名)
- ocamldep.byte (别名)
- ocamldep.opt (别名)
- ocamldoc (别名)
- ocamldoc.opt (别名)
- ocamllex (别名)
- ocamllex.byte (别名)
- ocamllex.opt (别名)
- ocamlmklib (别名)
- ocamlmktop (别名)
- ocamlobjinfo (别名)
- ocamlobjinfo.byte (别名)
- ocamlobjinfo.opt (别名)
- ocamlopt (别名)
- ocamlopt.byte (别名)
- ocamlopt.opt (别名)
- ocamloptp (别名)
- ocamlprof (别名)
- ocamlrun (别名)
- ocamlrund (别名)
- ocamlruni (别名)
- ocamlyacc (别名)

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 新鲜度

- 页面生成时间: 2026-05-26
- 管理器版本: 5.4.1
- 管理器更新时间: 2026-03-22
- 本地数据: ok
- 上游仓库: https://ocaml.org/
- info: Release/tag comparison is only available for GitHub repositories.

## 安全说明

generalized runtime or code generation signal.

- **Geiger 风险:** yellow / medium
- generalized runtime or code generation signal

## 相关链接

- [rocq](https://www.automicvault.com/pkg/brew/rocq/) - Popular package that depends on this formula.
- [ocaml-findlib](https://www.automicvault.com/pkg/brew/ocaml-findlib/) - Popular package that depends on this formula.
- [cpdf](https://www.automicvault.com/pkg/brew/cpdf/) - Popular package that depends on this formula.
- [ocaml-zarith](https://www.automicvault.com/pkg/brew/ocaml-zarith/) - Popular package that depends on this formula.
- [camlpdf](https://www.automicvault.com/pkg/brew/camlpdf/) - Popular package that depends on this formula.
- [camlp5](https://www.automicvault.com/pkg/brew/camlp5/) - Popular package that depends on this formula.
- [camlp-streams](https://www.automicvault.com/pkg/brew/camlp-streams/) - Popular package that depends on this formula.
- [ocamlbuild](https://www.automicvault.com/pkg/brew/ocamlbuild/) - Popular package that depends on this formula.
- [ocaml@4](https://www.automicvault.com/pkg/brew/ocaml-4/) - Package name indicates the same formula family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/)

## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- package version freshness
- package relationship graph
- cross-ecosystem install command graph
