javaCV UnsatisfiedLinkError

2020-04-24 16:56发布

问题:

I have a problem with JavaCV.

I downloaded javaCV-bin

and i added .jar file in my project in references libraries on ubuntu

I could worked sample codes which locate in downloaded file

But error is

Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/libjniopencv_core3835922554849797701.so: libopencv_core.so.2.4: 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:1750)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1646)
at java.lang.Runtime.load0(Runtime.java:787)
at java.lang.System.load(System.java:1022)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:403)
at com.googlecode.javacpp.Loader.load(Loader.java:342)
at com.googlecode.javacpp.Loader.load(Loader.java:316)
at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:131)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.googlecode.javacpp.Loader.load(Loader.java:335)
at com.googlecode.javacv.cpp.opencv_imgproc.<clinit>(opencv_imgproc.java:96)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.googlecode.javacpp.Loader.load(Loader.java:335)
at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(opencv_highgui.java:91)
at com.googlecode.javacv.OpenCVFrameGrabber.start(OpenCVFrameGrabber.java:171)
at MotionDetector.main(MotionDetector.java:23)

How can i solve the problem? How can i configure javaCV on ubuntu 11.10 for solving problem.

Thank for helping

回答1:

The README states under required software:

* OpenCV 2.4.0 http://sourceforge.net/projects/opencvlibrary/files/#

I'm guessing that's the problem.



回答2:

dude download library from link:

https://code.google.com/p/javacv/downloads/detail?name=javacv-0.5-cppjars.zip&can=2&q=

and add library opencv-linux-x86.jar to your project