我在运行
roslaunch usb_cam usb_cam_cam-test.launch
的时候报错如下:
process[usb_cam-1]: started with pid [5984]
/opt/ros/kinetic/lib/image_view/image_view: error while loading shared libraries: libopencv_core3.so.3.3: cannot open shared object file: No such file or directory
process[image_view-2]: started with pid [5985]
[image_view-2] process has died [pid 5985, exit code 127, cmd /opt/ros/kinetic/lib/image_view/image_view image:=/usb_cam/image_raw __name:=image_view __log:=/home/sophie/.ros/log/e7ab2ffa-18ac-11ea-af85-707781333a65/image_view-2.log].
log file: /home/sophie/.ros/log/e7ab2ffa-18ac-11ea-af85-707781333a65/image_view-2*.log
解决:
使用命令locate libopencv_core3.so.3.3
查找文件位于位于:/opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_core3.so.3.3
把/x86_64-linux-gnu/下的所有opencv库复制到/opt/ros/kinetic/lib
执行命令sudo cp /opt/ros/kinetic/lib/x86_64-linux-gnu/libopencv_* /opt/ros/kinetic/lib
即可