简体   繁体   中英

jna4412392371053342294.dll: Can't find dependent libraries

When i was installing cassandra I encountered this error:

INFO  [main] 2021-05-02 00:16:18,144 DatabaseDescriptor.java:775 - Back-pressure is disabled with strategy org.apache.cassandra.net.RateBasedBackPressure{high_ratio=0.9, factor=5, flow=FAST}.
Exception (java.lang.UnsatisfiedLinkError) encountered during startup: C:\Users\ASUS\AppData\Local\Temp\jna-2018896\jna4412392371053342294.dll: Can't find dependent libraries
java.lang.UnsatisfiedLinkError: C:\Users\ASUS\AppData\Local\Temp\jna-2018896\jna4412392371053342294.dll: Can't find dependent libraries
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1817)
        at java.lang.Runtime.load0(Runtime.java:810)
        at java.lang.System.load(System.java:1088)
        at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:851)
        at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:826)
        at com.sun.jna.Native.<clinit>(Native.java:140)`enter code here
        at org.apache.cassandra.utils.WindowsTimer.<clinit>(WindowsTimer.java:35)
        at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:630)
        at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:786)
ERROR [main] 2021-05-02 00:16:18,258 CassandraDaemon.java:803 - Exception encountered during startup
java.lang.UnsatisfiedLinkError: C:\Users\ASUS\AppData\Local\Temp\jna-2018896\jna4412392371053342294.dll: Can't find dependent libraries
        at java.lang.ClassLoader$NativeLibrary.load(Native Method) ~[na:1.8.0_282]
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934) ~[na:1.8.0_282]
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1817) ~[na:1.8.0_282]
        at java.lang.Runtime.load0(Runtime.java:810) ~[na:1.8.0_282]
        at java.lang.System.load(System.java:1088) ~[na:1.8.0_282]
        at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:851) ~[jna-4.2.2.jar:4.2.2 (b0)]
        at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:826) ~[jna-4.2.2.jar:4.2.2 (b0)]
        at com.sun.jna.Native.<clinit>(Native.java:140) ~[jna-4.2.2.jar:4.2.2 (b0)]
        at org.apache.cassandra.utils.WindowsTimer.<clinit>(WindowsTimer.java:35) ~[apache-cassandra-3.11.10.jar:3.11.10]
        at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:630) [apache-cassandra-3.11.10.jar:3.11.10]
        at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:786) [apache-cassandra-3.11.10.jar:3.11.10]
cd C:\Users\ASUS\Downloads\apache-cassandra-3.11.10-bin\apache-cassandra-3.11.10

java 1.8 and python 2.7 are installed How can i solve this problem please

So I was able to find a conversations of how to deal with this out on GitHub:

https://github.com/MarkusBernhardt/proxy-vole/issues/35

Basically, (older versions of) the JNA DLL is dynamically linked to msvcrt100.dll. To get around this issue, the latest version of the JNA libraries should be installed (looks like it was fixed in JNA 4.3+).

Also, running Apache Cassandra on Windows can be difficult, and wrought with strange errors (as you are seeing). I highly recommend running it on Linux. If you must use Windows as your base OS, VirtualBox or Docker can help.

I resolved this problem by this way:

  1. look at the tmp directory and quickly copy dll (in properties you can see its natural name), when it showing, before deleting.
  2. dumpbin /dependents {name}.dll shows its dependents dll's
  3. step by step find problem dll in windows directory and copy to {JDK_HOME}/bin . in my case it was msvcr100.dll , and it has several versions (x86, x64) - in first try, error change look, and i choose another.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM