Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant load OpenCV libraries without root access #40

Closed
GoogleCodeExporter opened this issue Apr 20, 2016 · 4 comments
Closed

Cant load OpenCV libraries without root access #40

GoogleCodeExporter opened this issue Apr 20, 2016 · 4 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Attempt to use JavaCV objects (say, create an IplImage) without root access.

What is the expected output? What do you see instead?

One would expect the program to run without issues, creating the IplImage.

The output we get is the following:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load 
library 'highgui': libcv.so.2.1: cannot open shared object file: No such file 
or directory
    at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:164)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:237)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:200)
    at name.audet.samuel.javacv.jna.Loader.load(Loader.java:44)
    at name.audet.samuel.javacv.jna.highgui.<clinit>(highgui.java:76)
    at com.hid.iod.imageprocessing.HidImage.<init>(TestImage.java:77)


The exact line where it fails is:
originalImage = cvLoadImage(location);

This is the first line in my code which summons a JavaCV object

What version of the product are you using? On what operating system?

I am using Java 1.6, JDK 6, OpenCV 2.1.0, JNA 3.2.5, and JavaCV 20100730. This 
is on RedHat Enterprise Linux Server Release 5.5 (Tikanga).


Please provide any additional information below.

The opencv libraries are in /usr/local/lib64/, which has chmod 777 (rwx for 
all).

Original issue reported on code.google.com by nsul...@gmail.com on 28 Dec 2010 at 7:37

@GoogleCodeExporter
Copy link
Author

Just for clarification purposes, my code runs perfectly if I have root access. 
It is without root access that it fails.

Original comment by nsul...@gmail.com on 28 Dec 2010 at 7:38

@GoogleCodeExporter
Copy link
Author

Could you try JNA 3.2.7 and the latest version of JavaCV? Thank you

Original comment by samuel.a...@gmail.com on 29 Dec 2010 at 1:53

@GoogleCodeExporter
Copy link
Author

Hi Samuel,

That seemed to fix it perfectly. Thanks so much!

Original comment by nsul...@gmail.com on 29 Dec 2010 at 10:30

@GoogleCodeExporter
Copy link
Author

Original comment by samuel.a...@gmail.com on 30 Dec 2010 at 2:00

  • Changed state: Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant