CMake Error :Could not find a package configuration file provided by “cv_bridge“解决办法

出现问题:

CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by “cv_bridge” with
any of the following names:

cv_bridgeConfig.cmake
cv_bridge-config.cmake

解决办法:

  1. 下载vision_opencv
git clone https://github.com/ros-perception/vision_opencv.git
  1. 编译
$ cd vision_opencv/cv_bridge

$ sudo mkdir build

$ cd build

$ cmake ..

$ make & make install

出现错误1:

Could not find a package configuration file provided by “rosconsole”
with any of the following names:

rosconsoleConfig.cmake
rosconsole-config.cmake

Add the installation prefix of “rosconsole” to CMAKE_PREFIX_PATH or
set “rosconsole_DIR” to a directory containing one of the above
files. If “rosconsole” provides a separate development package or
SDK, be sure it has been installed. Call Stack (most recent call
first): CMakeLists.txt:4 (find_package)

解决办法:

  1. 安装console_bridge,命令如下:
git clone https://github.com/ros/console_bridge
mkdir build
cd build
cmake ..
sudo make install
  1. 修改CMakeLists.txt文件

删除第四行:find_package(catkin REQUIRED COMPONENTS rosconsole sensor_msgs),添加语句:

set(console_bridge_DIR /home/ouc/install/console_bridge)

后面是你安装的console_bridge所在路径。

出现错误2:

CMake Error at /usr/share/cmake-3.5/Modules/FindBoost.cmake:1677
(message): Unable to find the requested Boost libraries.

Boost version: 1.58.0

Boost include path: /usr/include

Could not find the following Boost libraries:

      boost_python37

No Boost libraries were found. You may need to set BOOST_LIBRARYDIR
to the directory containing Boost libraries or BOOST_ROOT to the
location of Boost.
Call Stack (most recent call first):
CMakeLists.txt:12 (find_package)

解决办法:

  1. 安装boost库:
    https://blog.csdn.net/zym1348010959/article/details/87821713
  2. 修改CMakeLists.txt文件
    删除掉第12行:find_package(Boost REQUIRED python37),修改为:
set(boost_DIR /home/ouc/install/boost_1_69_0)

后面是你安装的boost库所在路径。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值