I am trying to install stardog using the following tutorial on a mac, but get the below error. Any idea how to resolve this? I cant find a easy solution online.
Mac version: 10.13.6
Video tutorial:
Error:
Smes:bin international$ ./stardog-admin server start --home /Users/international/StardogHome
-bash: ./stardog-admin: /bin/bash: bad interpreter: Operation not permitted
The tutorial you linked is quite old. Can you try installing according to the instructions in our docs and let us know if you're still seeing the same issue?
I tried this option before, but was not successful as I am not 100% sure what is going wrong.
Maybe you can point to the issues and resolves I need to take to get it working through this manual?
I added the code line "export STARDOG_HOME=/var/stardog" onto a new line into the .bash_profile file by opening the file using the following command in terminal:
open -a TextEdit.app ~/.bash_profile
After this I saved it and closed it.
Than, in terminal, I went to the location where I saved the license file and typed in the following command:
Than I executed in terminal the following command:
$ stardog-admin server start
Which gave be a different response than the manual indicating to me that something is not done correctly:
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/complexible/stardog/cli/admin/CLI : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Any ideas how to resolve this?
And if I want to go through finder to the stardog home folder, where do I find it?
You most likely need to source your ~/.bash_profile file by executing:
source ~/.bash_profile
in the same terminal session. Alternatively you can open up a new terminal session and your ~/.bash_profile should be sourced with the export STARDOG_HOME=/var/stardog addition.
What's happening in:
$ cp stardog-license-key.bin $STARDOG_HOME
is $STARDOG_HOME is most likely not set and thus the final cp command that gets executed is:
cp stardog-license-key.bin
There is no destination defined essentially so the cp command returns that it hasn't gotten enough arguments and prints its usage instructions.
In addition to doing what Noah suggested, can you also tell us the output of java -version? It's possible you're seeing errors from being on an older version of Java.
Thanks for the tip. opening up a new terminal window got me a step further. I now am getting the permission error. Do you also know what command I need to run to give the correct permission?
Can you try upgrading to Java 11? That'll put your Java Runtime Environment on a build of at least 1.8 (yours is on 1.6 currently), which should solve the issue.
Can you try running the copy command with sudo access? In other words, try sudo cp stardog-license-key.bin $STARDOG_HOME. You'll be prompted for your password.
Also, you're still on Java 8. Please upgrade to Java 11.
Forgot to mention - if you're getting frustrated with the difficulties of installing, you might like Stardog Cloud. All you need to do is sign up for a free account, and you can use Stardog without installing anything. You can read more here.
You can create the directory /var/stardog using sudo mkdir /var/stardog. From there you should be able to continue following the instructions in the docs.
Out of curiosity, are you planning to exclusively use Stardog through the CLI? That's the only way you'll be able to use it offline. All of our apps (Studio, Designer, and Explorer) require internet access.
At this point, it would probably be easiest to try creating a new STARDOG_HOME folder in a location that doesn't require administrator privileges. Can you try creating a directory in your home folder (mkdir ~/stardog-data) and set that as your STARDOG_HOME instead of /var/stardog? Then follow the instructions normally.
That solved the issue. Once I executed the command:
stardog-admin server start
dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
Referenced from: /usr/local/Caskroom/stardog/8.2.1/stardog-8.2.1/lib/libStarrocks.dylib (which was built for Mac OS X 10.15)
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: ____chkstk_darwin
Referenced from: /usr/local/Caskroom/stardog/8.2.1/stardog-8.2.1/lib/libStarrocks.dylib (which was built for Mac OS X 10.15)
Expected in: /usr/lib/libSystem.B.dylib
What version of Mac OS are you running? You can check by click the Apple menu in the corner of your screen and choosing About This Mac. (see more here)