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库所在路径。

你可能感兴趣的:(其他)