java.lang.UnsatisfiedLinkError: Library not loaded: @rpath/libo.dylib Reason: image not found
Posted 柳鲲鹏
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java.lang.UnsatisfiedLinkError: Library not loaded: @rpath/libo.dylib Reason: image not found相关的知识,希望对你有一定的参考价值。
- 具体错误
Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/taishansoft/eclipse-workspace/FontTest/lib-native/libopencv_java420.dylib: dlopen(/Users/taishansoft/eclipse-workspace/FontTest/lib-native/libopencv_java420.dylib, 1): Library not loaded: @rpath/libopencv_ml.4.2.dylib
Referenced from: /Users/taishansoft/eclipse-workspace/FontTest/lib-native/libopencv_java420.dylib
Reason: image not found
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 taishan.OpenCVTest.<clinit>(OpenCVTest.java:23)
- 原因
就是加载A库时,找不到B库。
- 解决办法有两个
把相应的库,复制到/usr/lib或/usr/local/lib下。
去掉rpath参数,重新编译。
以上是关于java.lang.UnsatisfiedLinkError: Library not loaded: @rpath/libo.dylib Reason: image not found的主要内容,如果未能解决你的问题,请参考以下文章