The project I'm working on is a server-side Clojure project with Leiningen as my build tool.
The problem occurs when I try to run the JAR I created using Leiningen's uberjar. The JAR is dependent on some native libraries I've placed in: /usr/lib/nativedeps/so.
Before I run the JAR I export the environment variable LD_LIBRARY_PATH with the native libs path so the linker will know where to look for the native libs:
export LD_LIBRARY_PATH=/usr/lib/ctch/so
And then I run it the JAR:
java -jar externalapibe-0.1.0-standalone.jar 3001
Which throws the exception:
java.lang.UnsatisfiedLinkError: no JavaASAPSDK in java.library.path
Which means the linker is unable to find JavaASAPSDK (which is one of the native libs in /usr/lib/nativedeps/so) and that I need to specify the lib path in java.library.path. So I run:
java -Djava.library.path=/usr/lib/nativedeps/so -jar externalapibe-0.1.0-standalone.jar 3001
Which throws the exception:
java.lang.UnsatisfiedLinkError: /usr/lib/nativedeps/so/libJavaASAPSDK.so: libprotobuf.so.6: cannot open shared object file: No such file or directory
Which means the lib JavaASAPSDK was found, but another lib called libprotobuf.so.6 (which JavaASAPSDK is dependent on) could not be found.
Problem is both libs are in the same directory!
Any ideas on what can cause this problem and how to solve it???
ldd
give on theso
file? – ClojureMostly