bad interpreter: Operation not permitted

Hi,

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

Thanks.

Hi,

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?

Best,
Steve

Hi, thanks for your quick response.

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:

$ cp stardog-license-key.bin $STARDOG_HOME

This gave me a strange response.

usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory

And nothing else.

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?

Thanks!

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?

this is the error:

cp: /var/stardog: Permission denied

Hi, the output is:

java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)

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.

Hi, I update to the latest version (attached
Screen Shot 2023-01-18 at 09.37.31
) but still getting the permission denied error. I think I need to give something permission on the folder, but not sure who and what permission.

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.

I am now a liitle further. Getting the following response after the copy command:

STARDOG_HOME '/var/stardog' is not a directory

Cant update java yet as their java.com/en page is broken.

Per my previous message, is using Stardog Cloud feasible for you? It would circumvent a lot of the issues you're seeing.

Unfortunately I will need to be able to run it offline.

So hope we can get this issue resolved. We are progressing it seems. only 1 or 2 steps left.

I updated to java 11:

java version "11.0.17" 2022-10-18 LTS

Java(TM) SE Runtime Environment 18.9 (build 11.0.17+10-LTS-269)

Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.17+10-LTS-269, mixed mode)

But still getting the error below when running this command:

stardog-admin server start

STARDOG_HOME '/var/stardog' is not a directory

It is looking I guess for a stardog directory in /var/ that is not there. Not sure why as I had to define this in the bash_profile.

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.

Hi, It tells me after running the command:

mkdir: /var/stardog: File exists

So the folder exists.

Not sure yet how I am going to use it. First need to get it installed. :slight_smile:

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

/usr/local/bin/stardog-admin: line 143: 9013 Abort trap: 6 "java" -Dstardog.home=/Users/in/Documents/stardog-data/ -Xmx2g -Xms2g -XX:MaxDirectMemorySize=1500m -Djava.library.path=/usr/local/Caskroom/stardog/8.2.1/stardog-8.2.1/bin/../lib -XX:SoftRefLRUPolicyMSPerMB=1 -XX:+UseParallelOldGC -XX:+UseCompressedOops -Djavax.xml.datatype.DatatypeFactory=org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl -Dapple.awt.UIElement=true -Dfile.encoding=UTF-8 --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED --add-opens=java.security.jgss/sun.security.krb5.internal.ktab=ALL-UNNAMED -Djdk.tls.client.protocols=TLSv1.2 -Dlog4j.configurationFile=/usr/local/Caskroom/stardog/8.2.1/stardog-8.2.1/bin/../server/dbms/log4j2.xml -Dstardog.install.location=/usr/local/Caskroom/stardog/8.2.1/stardog-8.2.1/bin/.. -server -classpath /usr/local/Caskroom/stardog/8.2.1/stardog-8.2.1/bin/../client/ext/:/usr/local/Caskroom/stardog/8.2.1/stardog-8.2.1/bin/../client/api/:/usr/local/Caskroom/stardog/8.2.1/stardog-8.2.1/bin/../client/cli/:/usr/local/Caskroom/stardog/8.2.1/stardog-8.2.1/bin/../client/http/:/usr/local/Caskroom/stardog/8.2.1/stardog-8.2.1/bin/../client/pack/:/usr/local/Caskroom/stardog/8.2.1/stardog-8.2.1/bin/../server/ext/:/usr/local/Caskroom/stardog/8.2.1/stardog-8.2.1/bin/../server/dbms/:confused: com.complexible.stardog.cli.admin.CLI server start >> /Users/in/Documents/stardog-data//stardog.log 2>&1

Any idea how to fix this? Hopefully we are close to resolve. :slight_smile:

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)

Hi, its 10.13.6 High Sierra