ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

error while loading shared libraries: libopencv_calib3d3.so.3.2: cannot open shared object file

asked 2018-08-12 09:47:06 -0500

DGCHAO gravatar image

updated 2018-08-12 13:56:33 -0500

gvdhoorn gravatar image

I see libopencv_calib3d.so, libopencv_calib3d.so.3.3, and libopencv_calib3d.so.3.3.1, but not what I need libopencv_calib3d.so.3.2 . I have tried several methods, update ubuntu, create a 3.2 to 3.3 soft connection, and modify ld.so.conf.My OpenCV version is 3.1, ubuntu 16.04 and kinetic.

process[republish-1]: started with pid [3405]
process[camera/image_proc-2]: started with pid [3406]
/opt/ros/kinetic/lib/image_proc/image_proc: error while loading shared libraries: libopencv_calib3d3.so.3.2: cannot open shared object file: No such file or directory
[camera/image_proc-2] process has died [pid 3406, exit code 127, cmd /opt/ros/kinetic/lib/image_proc/image_proc _approximate_sync:=true image_raw:=image __name:=image_proc __log:=/home/burger/.ros/log/ccdd3c4e-9ba4-11e8-9c4b-000c29da7948/camera-image_proc-2.log].
log file: /home/burger/.ros/log/ccdd3c4e-9ba4-11e8-9c4b-000c29da7948/camera-image_proc-2*.log
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2018-08-12 18:51:09 -0500

I've had issues where libraries have been linked to over specific versions of the shared objects. There is a simple but slightly messy fix. You can create a symlink from libopencv_calib3d.so.3.3 to libopencv_calib3d.so.3.2 you may have to repeat this for quite a few of the openCV shared objects but I've always managed to get things working using this method.

Hope this helps.

edit flag offensive delete link more

Comments

Thank you for your answer I have try ln -s libopencv_calib3d3.so.3.3 libopencv_calib3d3.so.3.2sudo ldconfig And I use the ls -l command to see the links that have been created.But the error has not changed

DGCHAO gravatar image DGCHAO  ( 2018-08-13 01:27:49 -0500 )edit
1

Is it exactly the same error message? I'd expect it to fail now with a different openCV .so file with a very similar name.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-08-13 02:04:53 -0500 )edit

It’s exactly the same error message, it doesn't seem to have any effect.There may be other reasons for this error.

DGCHAO gravatar image DGCHAO  ( 2018-08-13 02:20:07 -0500 )edit

I installed two OpenCV versions, one is 2.4.9 and the other is 3.3.1. Will it be the reason for this?

DGCHAO gravatar image DGCHAO  ( 2018-08-13 02:23:09 -0500 )edit

It looks like it's a problem with the library paths in this case. Have you got a build dependency on openCV3 on your package.xml file and the correct dependency set in CMakeLists.txt?

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-08-13 04:48:11 -0500 )edit

I find the dependency on package.xml .<exec_depend>python-opencv</exec_depend>.But when I view the dynamic link library through the burger@burger:/opt/ros/kinetic/lib/arm-linux-gnueabihf$ ldd libopencv_calib3d3.so.3.3 It won't show about libopencv_calib3d3.so.

DGCHAO gravatar image DGCHAO  ( 2018-08-13 21:30:39 -0500 )edit

It seems to be able to use some libraries in OpenCV3, of course not including libopencv_calib3d3.so.

DGCHAO gravatar image DGCHAO  ( 2018-08-13 21:34:31 -0500 )edit

That's strange.When I verify withpkg-config --modversion opencv which shows 2.4.9 version .But when verify withpython -c "import cv2 :print cv2__version__"which shows 3.3.1 version.

DGCHAO gravatar image DGCHAO  ( 2018-08-14 01:52:28 -0500 )edit

Question Tools

Stats

Asked: 2018-08-12 09:47:06 -0500

Seen: 3,319 times

Last updated: Aug 12 '18