Failed to link the C library against JNA, Cannot open shared object file
0
votes
2
answers
531
views
I am having issues with installing Cassandra 4.0 and 4.1 on my rhel 8 server.
I've tried using java 11 openjdk and Corretto 11 openjdk.
When I start Cassandra I would receive:
Native LibraryLinux.java - Failed to link the C library against JNA. \
Native methods will not be available.
java.lang.UnsatisfiedLinkError: /tmp/jna8760917299733827163.tmp: \
/tmp/jna8760917299733827163.tmp: cannot open shared object: Operation not permitted
I've tried adding these commands separate and together in cassandra-env.sh
file:
JVM_OPTS="$JVM_OPTS -Djava.io.tmpdir=$CASSANDRA_HOME/tmp"
JVM_OPTS="$JVM_OPTS -Djna.tmpdir=$CASSANDRA_HOME/tmp"
I even tried export JVM_OPTS="$JVM_OPTS -Djava.io.tmpdir=$CASSANDRA_HOME/tmp"
Once that is input the error changes to:
java.lang.UnsatisfiedLinkError: Failed to create temporary file for /com/sun/jna/win32-x86/jnidispatch.dll library: \
JNA temporary directory 'cassandra/tmp' does not exist
Once I create it and start Cassandra a new error shows as:
java.lang.UnsatisfiedLinkError: Failed to create temporary file for /com/sun/jna/win32-x86/jnidispatch.dll library: \
JNA temporary directory 'cassandra/tmp' is not writable
I tried to change permissions, but it would go back to the original error.
Does anyone have a solution for this?
Asked by jexport
(1 rep)
May 3, 2024, 07:19 PM
Last activity: May 7, 2024, 06:35 AM
Last activity: May 7, 2024, 06:35 AM