# OCaml for ARM MacOS

**URL:** <https://discuss.ocaml.org/t/ocaml-for-arm-macos/6019>\
**Category:** Ecosystem\
**Tags:** arm, mac\
**Created:** [June 23, 2020, 12:24pm UTC](https://discuss.ocaml.org/t/ocaml-for-arm-macos/6019 "2020-06-23T12:24:28Z")\
**Posts on this page:** 1\
**Showing post:** 23

<div class="post-metadata">

**Author:** ![xavierleroy](https://avatars.discourse-cdn.com/v4/letter/x/a9adbd/32.png) [@xavierleroy](https://discuss.ocaml.org/u/xavierleroy)\
**Post date:** [January 15, 2021, 5:41pm UTC](https://discuss.ocaml.org/t/ocaml-for-arm-macos/6019/23 "2021-01-15T17:41:16Z")

</div>

It’s quite easy to get up to speed using the precompiled OPAM binary for macOS/ARM64.

- Download [opam-2.0.7-arm64-macos](https://github.com/ocaml/opam/releases/download/2.0.7/opam-2.0.7-arm64-macos).

- Move it to some directory in your PATH, rename it to `opam`, and make it executable. From a Terminal window:

```auto
mv ~/Downloads/opam-2.0.7-arm64-macos /usr/local/bin/opam
chmod +x /usr/local/bin/opam

```

- Try to execute it: `opam init`. You will be blocked by the macOS security checks, as the binary is not signed.

- Open Preferences / Security and Privacy. There should be a notice “opam was blocked because…” and an “Allow Anyway” button. Click on that button.

- Try again to execute `opam init`. You will be blocked again, but now there is an “Open” button. Click on that button. `opam init` should run and install the OCaml 4.10.2 compiler.

- From now on, you can run `opam` without being blocked. Use this freedom to `opam install` the packages you need.

- Some packages that depend on external C libraries may fail to install because these C libraries are not available. Normally we would rely on Homebrew or MacPorts to provide these C libraries, but these package collections are still being ported to macOS/ARM64.

As a reward for these minor inconveniences, you’ll get excellent performance running OCaml software such as Coq. Single-core performance on a MacBook Air M1 is 20% better than the best x86 workstation I have access to.

---

_[View the full topic](https://discuss.ocaml.org/t/ocaml-for-arm-macos/6019)._
