Ask Your Question
0

Error with libcxcore.so.2

asked 2013-01-21 12:29:15 -0600

aaugustho gravatar image

Hi,

I'm trying to run an old program, made using an old version of OpenCV, on my notebook in which I've installed OpenCV 2.4.1

When I try to run this program it gives me the error message

Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: libcxcore.so.2: cannot open shared object file: No such file or directory

I guess the libraries' names have changed.

Someone can help me please.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-01-21 12:33:35 -0600

unxnut gravatar image

It should be easy enough to check for that. Just look into your lib directory and see what is the name of the library. I am not on Linux right now but another item to check will be the LD_LIBRARY_PATH environment variable and make sure that it points to the correct library location.

edit flag offensive delete link more

Comments

I've looked into my lib directory and I've found any library called 'libcxcore.so.2'.

So, I think there should be a new library equivalent to that one, or the same library with a new name (there is 'libopencv_core.so' , for example). Am I right or am I doing something wrong?

Sorry if my english isn't good. And I'm new at OpenCV.

aaugustho gravatar imageaaugustho ( 2013-01-21 12:56:39 -0600 )edit

You can check the data stamps on the two libraries but libopencv_core.so seems to be the correct name for the new library. However, since you found libcxcore.so.2 in your lib, your executable is unable to find it. All you need to do is to set your LD_LIBRARY_PATH. If libcxcore.so.2 is in the directory /usr/local/opencv/lib, you will execute the following before executing your code:

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/opencv/lib

Substitute the location of library appropriately. This is assuming that you are running bash shell on Linux.

unxnut gravatar imageunxnut ( 2013-01-21 13:22:29 -0600 )edit

Question Tools

Stats

Asked: 2013-01-21 12:29:15 -0600

Seen: 774 times

Last updated: Jan 21 '13