Discussion Forum

Mac m1 installation issue


I’m using mac m1, after installation of Grakn core and during runtime I’m getting java.lang.UnsatisfiedLinkError.

A little more research on the error allowed me to understand that I might be trying to run 64-bit Java with a 32-bit .jnilib from Grakn.

However there are no alternatives for jdk11 download with different architecture for mac m1 at https://www.azul.com/downloads/zulu-community/?version=java-11-lts&os=macos&architecture=arm-64-bit&package=jdk.

I’d like to know what would be the best solution for this . I’ve pasted my complete error below. Your help will be greatly appreciated

Exception in thread “main” java.lang.UnsatisfiedLinkError: /private/var/folders/d_/x8pf2pl55rz8brq9zcp6f81c0000gn/T/librocksdbjni3547951306004320959.jnilib: dlopen(/private/var/folders/d_/x8pf2pl55rz8brq9zcp6f81c0000gn/T/librocksdbjni3547951306004320959.jnilib, 1): no suitable image found. Did find:
/private/var/folders/d_/x8pf2pl55rz8brq9zcp6f81c0000gn/T/librocksdbjni3547951306004320959.jnilib: mach-o, but wrong architecture
/private/var/folders/d_/x8pf2pl55rz8brq9zcp6f81c0000gn/T/librocksdbjni3547951306004320959.jnilib: mach-o, but wrong architecture
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2627)
at java.base/java.lang.Runtime.load0(Runtime.java:768)
at java.base/java.lang.System.load(System.java:1837)
at org.rocksdb.NativeLibraryLoader.loadLibraryFromJar(NativeLibraryLoader.java:79)
at org.rocksdb.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:57)
at org.rocksdb.RocksDB.loadLibrary(RocksDB.java:69)
at org.rocksdb.RocksDB.(RocksDB.java:38)
at grakn.core.rocks.RocksGrakn.(RocksGrakn.java:50)
at grakn.core.rocks.RocksFactory.grakn(RocksFactory.java:34)
at grakn.core.server.GraknServer.(GraknServer.java:89)
at grakn.core.server.GraknServer.(GraknServer.java:73)
at grakn.core.server.GraknServer.runServer(GraknServer.java:241)
at grakn.core.server.GraknServer.main(GraknServer.java:222)

Hi @swathi-dinakaran welcome!

Take a look at this issue: https://github.com/graknlabs/grakn/issues/6255


Take a look at this conversation in discord: Discord

Let us know how you get on.

Hello @daniel ,
thank you! The discussion seems to lead me to workaround for mac m1 .https://github.com/facebook/rocksdb/issues/7720 .
However the link mentioned shows 403 error to me. Also it would be very helpful to know how to execute this file if found. I also don’t have access to the discord channel actually.

@swathi-dinakaran – it should have redirected to: Support ARM processors using aarch64 (new Apple hardware, Raspberry Pi's) · Issue #6255 · vaticle/typedb · GitHub

I’m facing the same problems as @swathi-dinakaran in here initial post and was wondering if there is any news on how to use TypeDB Core successfully on M1 macs?

Having had a look on

didn’t help so far, either.

Hi @Dominic,

We believe that Apple’s translation layer should help you here.

If you have Rosetta 2 installed https://support.apple.com/en-gb/guide/security/secebb113be1/web you should be able to start TypeDB with something like arch -x86_64 /bin/bash ./typedb server

As an aside, this instruction could also come in handy where the entirety of your terminal would be started under Rosetta: How to Run Homebrew & x86 Terminal Apps on M1 Macs

Sorry to not have more prescriptive instructions. If you could please report back on what you do and whether it’s successful that would be very very much appreciated!

Hi @james ,

Thank you for your reply and your suggestions. I have installed TypeDB via Homebrew (and Rosetta 2) but was not able to start the server using Rosetta 2.

As I currently only evaluate solutions on the side (coming from semantic web technologies like OWL, RDF etc.) I currently use another system for TypeDB.

Another thing you can try out is a docker-based solution. However we have been able to get TypeDB to run using rosetta on M1 macs before, using james’ instructions.

I think the first command (arch -x86_64...) you wouldn’t run with a homebrew installation, but download the distribution and run the server inside the archive directly using this command.