vinhkhuc / JFastText

Java interface for fastText
Other
228 stars 100 forks source link

linux环境下,java.lang.UnsatisfiedLinkError: no jniFastTextWrapper in java.library.path,环境已安装clang-3.3 python 2.6 or newer numpy & scipy #18

Open hw201212 opened 7 years ago

hw201212 commented 7 years ago

java.lang.UnsatisfiedLinkError: no jniFastTextWrapper in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) ~[?:1.8.0_91] at java.lang.Runtime.loadLibrary0(Runtime.java:870) ~[?:1.8.0_91] at java.lang.System.loadLibrary(System.java:1122) ~[?:1.8.0_91] at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:945) ~[stormjar.jar:?] at org.bytedeco.javacpp.Loader.load(Loader.java:750) ~[stormjar.jar:?] at org.bytedeco.javacpp.Loader.load(Loader.java:657) ~[stormjar.jar:?] at com.github.jfasttext.FastTextWrapper.(FastTextWrapper.java:10) ~[stormjar.jar:?] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_91] at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_91] at org.bytedeco.javacpp.Loader.load(Loader.java:712) ~[stormjar.jar:?] at org.bytedeco.javacpp.Loader.load(Loader.java:657) ~[stormjar.jar:?] at com.github.jfasttext.FastTextWrapper$FastTextApi.(FastTextWrapper.java:171) ~[stormjar.jar:?] at com.github.jfasttext.JFastText.(JFastText.java:13) ~[stormjar.jar:?] at com.taidi.poas.process.topology.cluster.bolt.HotClusterBolt.prepare(HotClusterBolt.java:83) ~[stormjar.jar:?] at org.apache.storm.daemon.executor$fn4973$fn4986.invoke(executor.clj:791) ~[storm-core-1.0.3.jar:1.0.3] at org.apache.storm.util$async_loop$fn__557.invoke(util.clj:482) [storm-core-1.0.3.jar:1.0.3] at clojure.lang.AFn.run(AFn.java:22) [clojure-1.7.0.jar:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91] Caused by: java.lang.UnsatisfiedLinkError: /root/.javacpp/cache/stormjar.jar/com/github/jfasttext/linux-x86_64/libjniFastTextWrapper.so: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /root/.javacpp/cache/stormjar.jar/com/github/jfasttext/linux-x86_64/libjniFastTextWrapper.so) at java.lang.ClassLoader$NativeLibrary.load(Native Method) ~[?:1.8.0_91] at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) ~[?:1.8.0_91] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) ~[?:1.8.0_91] at java.lang.Runtime.load0(Runtime.java:809) ~[?:1.8.0_91] at java.lang.System.load(System.java:1086) ~[?:1.8.0_91] at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:925) ~[stormjar.jar:?] ... 14 more

hw201212 commented 7 years ago

how to slove this problem?Thanks

ali3assi commented 6 years ago

Hello Sir @hw210212 Please im facing the same problem. Did you solved it? If yes can you please provide me the solution Thankyou

ali3assi commented 6 years ago

Sir @hw210212,

I just resolved this issue. Just when you run the command run package you will get in the target folder two .jar. just taked these two jar and use them in your project. I dont know which type of project are you using. By the way Im using Jython.

By the way, if you have any idea about how to get an ngram vector for a given word i will thabk you

masud-technope commented 6 years ago

Hey guys! I am facing the problem as well. When I compile and run in Linux, everything works fine. But when I bring them to windows machine, I get this error.

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniFastTextWrapper in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:945)

Please note that I added the jars from target folder to my project build path, but it is not working. I also have gcc installed in the windows machine.

Please help.

baiziyuandyufei commented 6 years ago

where is the .so file?