catkin_make:Project ‘cv_bridge‘ specifies ‘/usr/include/opencv‘ as an include dir, which is not fo

本文涉及的产品
资源编排,不限时长
简介: catkin_make:Project ‘cv_bridge‘ specifies ‘/usr/include/opencv‘ as an include dir, which is not fo
编译darknet_ros时遇到的问题

报错信息:

- Found OpenCV: /usr (found version "4.1.1") 
CMake Error at /opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake:113 (message):
  Project 'cv_bridge' specifies '/usr/include/opencv' as an include dir,
  which is not found.  It does neither exist as an absolute directory nor in
  '${{prefix}}//usr/include/opencv'.  Check the issue tracker
  'https://github.com/ros-perception/vision_opencv/issues' and consider
  creating a ticket if the problem has not been reported yet.
Call Stack (most recent call first):
  /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
  darknet_ros/darknet_ros/CMakeLists.txt:52 (find_package)
-- Configuring incomplete, errors occurred!

错误原因:

opencv版本较高,编译程序寻找/usr/include/opencv,但本机并没有
cd /usr/include
ll opencv*
只能发现opencv4这个目录,因为本机安装的较高版本的opencv

解决办法:

cd /usr/include
#你的本机目录对应你的opencv版本,设置链接后解决,不必再改CMakeList
ln -s opencv4 opencv
相关实践学习
Docker镜像管理快速入门
本教程将介绍如何使用Docker构建镜像,并通过阿里云镜像服务分发到ECS服务器,运行该镜像。
阿里云资源编排ROS使用教程
资源编排(Resource Orchestration)是一种简单易用的云计算资源管理和自动化运维服务。用户通过模板描述多个云计算资源的依赖关系、配置等,并自动完成所有资源的创建和配置,以达到自动化部署、运维等目的。编排模板同时也是一种标准化的资源和应用交付方式,并且可以随时编辑修改,使基础设施即代码(Infrastructure as Code)成为可能。 产品详情:https://www.aliyun.com/product/ros/
相关文章
|
2月前
|
计算机视觉 Python
ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly
ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly
61 2
【解决方案】成功解决ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects报错信息
成功解决ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects报错信息
【解决方案】成功解决ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects报错信息
|
24天前
|
算法 计算机视觉
【Qt&OpenCV 图像的感兴趣区域ROI】
【Qt&OpenCV 图像的感兴趣区域ROI】
23 1
|
24天前
|
运维 算法 计算机视觉
【Qt&OpenCV 图像的模板匹配 matchTemplate/minMaxLoc】
【Qt&OpenCV 图像的模板匹配 matchTemplate/minMaxLoc】
20 1
|
1月前
|
计算机视觉
OpenCV中图像算术操作与逻辑操作
OpenCV中图像算术操作与逻辑操作
35 1
|
1月前
|
计算机视觉
OpenCV图像二值化
OpenCV图像二值化
|
1月前
|
存储 Cloud Native Linux
OpenCV图像翻转和旋转
OpenCV图像翻转和旋转
|
1月前
|
存储 Cloud Native Linux
OpenCV鼠标操作(画红色方框截取图像)
OpenCV鼠标操作(画红色方框截取图像)
|
1月前
|
计算机视觉
OpencV图像几何形状绘制
OpencV图像几何形状绘制
|
1月前
|
计算机视觉
OpenCV图像像素值统计
OpenCV图像像素值统计