I tried running TypeDB on my M1 MacBook using ./typedb server, but it results in the following error:
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?
If the running JDK targets aarch64 (ARM), the architecture used by an M1 Mac, then an UnsatisfiedLinkError is thrown at startup. There is no native ARM build of TypeDB yet, so in order for TypeDB to run correctly on an M1 MacBook you need to ensure that a JDK that targets x64 architecture is installed.
For example, to install Eclipse Temurin (based upon OpenJDK):
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. It may be advisable to avoid using Homebrew on M1 Mac for now and falling back to just downloading the tar.gz archive and installing x86_84 Java separately.
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.