当前位置:   article > 正文

Could not find a package configuration file provided by “OpenCV“ with any of the following na_"could not find a package configuration file provi

"could not find a package configuration file provided by \"opencv\" with any of"

安装realsense d455时报错,在google上搜到解决办法,分享出来,原链接在这这里
问题描述:
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by “OpenCV” with any
of the following names:

OpenCVConfig.cmake
opencv-config.cmake
  • 1
  • 2

Add the installation prefix of “OpenCV” to CMAKE_PREFIX_PATH or set
“OpenCV_DIR” to a directory containing one of the above files. If “OpenCV”
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
realsense-ros/realsense2_camera/CMakeLists.txt:14 (find_package)

解决办法:
在 realsense-ros/realsense2_camera/CMakeLists.txt里面的find_package前面加上下面这句:
set(OpenCV_DIR /usr/share/OpenCV/)

后续问题!!!
加了这两句后执行操作 roslaunch realsense2_camera rs_camera.launch 时又出现了下面这个报错
/opt/ros/melodic/lib/nodelet/nodelet: symbol lookup error: /home/tang/catkin_ws/devel/lib//librealsense2_camera.so: undefined symbol: _ZN2cv3MatC1Ev
[camera/realsense2_camera_manager-2] process has died [pid 16390, exit code 127, cmd /opt/ros/melodic/lib/nodelet/nodelet manager __name:=realsense2_camera_manager __log:=/home/tang/.ros/log/eeedd618-d9f7-11ed-855b-dcfb484ed9d2/camera-realsense2_camera_manager-2.log].
log file: /home/tang/.ros/log/eeedd618-d9f7-11ed-855b-dcfb484ed9d2/camera-realsense2_camera_manager-2*.log

解决方法。把刚刚加的那一句删除就就解决问题了,原因不知道为啥

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/292933
推荐阅读
相关标签
  

闽ICP备14008679号