Error installing on Mac. Can't load star rocks

I am trying to install stardog on a Mac. I installed from zip, set STARDOG_HOME and added the bin and lib folders of the installation to the path. I am using openjdk 11. When I run Stardog-admin server start, I get the following error message:

catherinedalzell@Catherines-MacBook-Pro ~ % stardog-admin server start

ERROR 2021-11-22 16:50:00,495 [main] com.stardog.starrocks.StarrocksUtils:loadLibrary(73): Failed to load any starrocks library

ERROR 2021-11-22 16:50:00,497 [main] com.stardog.starrocks.StarrocksUtils:loadLibrary(75): Failed to load Starrocks

java.lang.UnsatisfiedLinkError: /Users/catherinedalzell/stardog-7.8.0/lib/libStarrocks.dylib: dlopen(/Users/catherinedalzell/stardog-7.8.0/lib/libStarrocks.dylib, 0x0001): tried: '/Users/catherinedalzell/stardog-7.8.0/bin/../lib/libStarrocks.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/Users/catherinedalzell/stardog-7.8.0/lib/libStarrocks.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/libStarrocks.dylib' (no such file), '/usr/lib/libStarrocks.dylib' (no such file)

at java.lang.ClassLoader$NativeLibrary.load0(Native Method) ~[?:?]

at java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442) ~[?:?]

at java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498) ~[?:?]

at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694) ~[?:?]

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2659) ~[?:?]

at java.lang.Runtime.loadLibrary0(Runtime.java:830) ~[?:?]

at java.lang.System.loadLibrary(System.java:1873) ~[?:?]

at com.stardog.starrocks.StarrocksUtils.loadLibrary(StarrocksUtils.java:63) [stardog-7.8.0.jar:?]

at com.complexible.stardog.Stardog.(Stardog.java:167) [stardog-7.8.0.jar:?]

at com.complexible.stardog.Stardog.(Stardog.java:65) [stardog-7.8.0.jar:?]

at com.complexible.stardog.Stardog$StardogBuilder.create(Stardog.java:663) [stardog-7.8.0.jar:?]

at com.complexible.stardog.cli.impl.ServerStart.call(ServerStart.java:177) [stardog-cli-7.8.0.jar:?]

at com.complexible.stardog.cli.impl.ServerStart.call(ServerStart.java:43) [stardog-cli-7.8.0.jar:?]

at com.complexible.stardog.cli.CLIBase.execute(CLIBase.java:56) [stardog-cli-7.8.0.jar:?]

at com.complexible.stardog.cli.admin.CLI.main(CLI.java:228) [stardog-cli-7.8.0.jar:?]

ERROR 2021-11-22 16:50:00,501 [main] com.stardog.starrocks.StarrocksUtils:dumpLibraryInformation(115): Unable to load native library(Starrocks):

java.library.path = </Users/catherinedalzell/stardog-7.8.0/bin/../lib>

LD_LIBRARY_PATH = {/Users/catherinedalzell/stardog-7.8.0/bin/../lib}

Hi,

Stardog currently does not have a native build that supports the M1 chip (though it is on the roadmap). To get around this, you will need to install an x86 JDK and ensure that Stardog runs through it. You can do this via Rosetta:

# If Rosetta is not already installed
$ softwareupdate --install-rosetta

# Run homebrew in x86_64 mode so it can find the x86 JVM
$ arch -x86_64 /bin/zsh -c "brew tap adoptopenjdk/openjdk && brew install adoptopenjdk11"

You can either have this be the only JDK on your system, in which case you're good to go, or you can use some kind of version management software (jenv, asdf, sdkman, etc.)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.