# Running TypeDB on an M1 MacBook

**URL:** <https://forum.typedb.com/t/running-typedb-on-an-m1-macbook/53>\
**Category:** TypeDB\
**Tags:** macos, typedb-server\
**Created:** [23 February 2022 13:24 UTC](https://forum.typedb.com/t/running-typedb-on-an-m1-macbook/53 "2022-02-23T13:24:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.typedb.com/alex/32/148_2.png) [@alex](https://forum.typedb.com/u/alex)\
**Post date:** [23 February 2022 13:24 UTC](https://forum.typedb.com/t/running-typedb-on-an-m1-macbook/53/1 "2022-02-23T13:24:11Z")

</div>

I tried running TypeDB on my M1 MacBook using `./typedb server`, but it results in the following error:

```auto
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/5v/95_mbj013y93vsmc8xps0stm0000gp/T/librocksdbjni8182124459810412816.jnilib
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2393)
    at java.base/java.lang.Runtime.load0(Runtime.java:755)
    at java.base/java.lang.System.load(System.java:1953)

```

This error looks like it might occur when running a Java program with an incompatible JDK. What can I do to resolve it?

---

<div class="post-metadata">

**Author:** ![alex](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.typedb.com/alex/32/148_2.png) [@alex](https://forum.typedb.com/u/alex)\
**Post date:** [29 September 2022 12:11 UTC](https://forum.typedb.com/t/running-typedb-on-an-m1-macbook/53/2 "2022-09-29T12:11:49Z")

</div>

# TypeDB v2.19 or above

As of TypeDB 2.19.0, TypeDB supports native Mac and Linux `arm` architectures. Simply install a native Java runtime to run TypeDB.

# Old versions of TypeDB

> ⚠ Prior to TypeDB 2.19.0, there were no distributions available for `aarch64` (ARM). As of Jul 6, 2023, the [best solution](https://forum.typedb.com/t/running-typedb-on-an-m1-macbook/53/6) is to [upgrade](https://github.com/vaticle/typedb/releases) to TypeDB 2.19.0 or above. If doing so through Homebrew, ensure you are using an ARM64 installation of `brew` (i.e. the default).

If the running JDK targets `aarch64` (ARM), the architecture used by an M1 Mac, then an `UnsatisfiedLinkError` is thrown at startup. There are no native ARM builds of TypeDB \<v2.19.0, so in order for TypeDB to run correctly on an M1 MacBook you need to either upgrade TypeDB, or ensure that a JDK that targets `x64` architecture is installed.

For example, to install Eclipse Temurin (based upon OpenJDK):

1. Visit [Latest Releases | Adoptium](https://adoptium.net/en-GB/temurin/releases/?version=11) to browse Temurin releases
2. Select the `.pkg` distribution of `JDK 11` with operating system `MacOS` and architecture `x64`
3. Download and install the Java binary displayed in the list below
4. Verify that Java was installed correctly by running `java --version`; the output should match the downloaded JDK version

_Please note that this method relies on MacOS’s [Rosetta translation](https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment), which will inflict a performance overhead on the application._

### Homebrew

**Important** : We advise against attempting to install TypeDB \<2.19.0 using Homebrew on a Mac with Apple Silicon chip. Please install via [direct download](https://docs.vaticle.com/docs/running-typedb/install-and-run) instead. See below for explanation.

Homebrew users may need to run `brew` in `x86_64` mode to install TypeDB under Rosetta with Apple Silicon (see [macos - How to run the Homebrew installer under Rosetta 2 on M1 Macbook - Stack Overflow](https://stackoverflow.com/questions/64882584/how-to-run-the-homebrew-installer-under-rosetta-2-on-m1-macbook) for details). The command might look like the following:

```sh
arch -x86_64 /usr/local/homebrew/bin/brew install typedb

```

Please be aware that this installation may take a **very** long time; in particular, several prerequisite packages including `gettext` need to be compiled from source under Rosetta, which is not cheap. Also, we’ve observed that in some cases the incorrect version of `openjdk` is installed as a dependency, which causes a different runtime error.

---

<div class="post-metadata">

**Author:** ![alan\_wu](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@alan\_wu](https://forum.typedb.com/u/alan_wu)\
**Post date:** [7 November 2022 01:58 UTC](https://forum.typedb.com/t/running-typedb-on-an-m1-macbook/53/3 "2022-11-07T01:58:19Z")

</div>

Hi Alex, thank you for this note. Just a heads-up for you guys: I am using Mac M1 pro and have set up x64 JDK11 as suggested above. However, after I installed the latest typedb (v2.12) via `brew install typedb`, the `Java UnsatisfiedLinkError` persisted. The error went away when I download typedb (v2.11.1) from [Vaticle](https://vaticle.com/download).

---

<div class="post-metadata">

**Author:** ![alex](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.typedb.com/alex/32/148_2.png) [@alex](https://forum.typedb.com/u/alex)\
**Post date:** [7 November 2022 10:42 UTC](https://forum.typedb.com/t/running-typedb-on-an-m1-macbook/53/4 "2022-11-07T10:42:48Z")

</div>

Hi Alan,

Homebrew users may also need to run `brew` in `x86_64` mode to install under Rosetta with Apple Silicon (see [macos - How to run the Homebrew installer under Rosetta 2 on M1 Macbook - Stack Overflow](https://stackoverflow.com/questions/64882584/how-to-run-the-homebrew-installer-under-rosetta-2-on-m1-macbook) for details).

---

<div class="post-metadata">

**Author:** ![Ben](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.typedb.com/ben/32/113_2.png) [@Ben](https://forum.typedb.com/u/Ben)\
**Post date:** [31 May 2023 12:22 UTC](https://forum.typedb.com/t/running-typedb-on-an-m1-macbook/53/5 "2023-05-31T12:22:14Z")

</div>

I think it can also be helpful to _uninstall_ the preexisting non-Temurin JDK installation, to avoid having to muck about with environment variables and RC-file modifications.

---

<div class="post-metadata">

**Author:** ![joshua](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.typedb.com/joshua/32/28_2.png) [@joshua](https://forum.typedb.com/u/joshua)\
**Post date:** [6 July 2023 09:41 UTC](https://forum.typedb.com/t/running-typedb-on-an-m1-macbook/53/6 "2023-07-06T09:41:42Z")

</div>

We’re happy to announce that as of TypeDB 2.19.0, TypeDB supports native Mac and Linux `arm` architectures!

As a result, to install on M1 Macs, it is no longer required to install a separate Java to run under Rosetta emulation.  
Instead, simply install a native Java runtime, for example via `brew`!

As always, get the latest TypeDB from `brew` or the Github releases page [Releases · vaticle/typedb · GitHub](https://github.com/vaticle/typedb/releases).  
🎆 🎆 🎆
