0

How do i set it in the Linux environment?

I keep getting the below error.
I am assuming its because i have to set the -Djava path . in eclipse i set in the arguments in the run configuration.

java.lang.UnsatisfiedLinkError: /opt/apache-tomcat-8.0.33/temp/librocksdbjni1678787310187961141..so: libgflags.so.2: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
    at java.lang.Runtime.load0(Runtime.java:809)
    at java.lang.System.load(System.java:1086)
    at org.rocksdb.NativeLibraryLoader.loadLibraryFromJar(NativeLi
Jim Garrison
  • 85,615
  • 20
  • 155
  • 190
Shreyas K C
  • 140
  • 6

1 Answers1

0

You need to set the JVM parameter in [path to tomcat]/bin/catalina.sh, in the variable CATALINA_OPTS or JAVA_OPTS.

The value should be a valid Linux path (or paths) containing your libraries.

You can refer to this question: add jvm options in tomcat

Community
  • 1
  • 1
KC Wong
  • 2,410
  • 1
  • 18
  • 26
  • You should NEVER edit catalina.sh or catalina.bat. You should add a setenv.bat or setenv.sh file. Look here and search for "(3.4)". https://tomcat.apache.org/tomcat-8.5-doc/RUNNING.txt – Jamie Oct 02 '17 at 22:28