天天看点

Could not find a package configuration file provided by “catkin“ : catkinConfig.cmake 解决方法一、问题描述二、参考解决方法

一、问题描述

自己编译 Autoware 的时候遇到如下问题:

CMake Error at CMakeLists.txt:4 (find_package):
  By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "catkin", but
  CMake did not find one.

  Could not find a package configuration file provided by "catkin" with any
  of the following names:

    catkinConfig.cmake
    catkin-config.cmake

  Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set
  "catkin_DIR" to a directory containing one of the above files.  If "catkin"
  provides a separate development package or SDK, be sure it has been
  installed.

           

二、参考解决方法

(这里只给出参考解决方法,主要原因是自己不是很确定就是通过这种方法来解决的这个问题。)

系统缺少 catkin 这个包,直接安装就可以。

sudo apt-get install ros-melodic-catkin
           

注意,还是没有作用,不建议执行

sudo apt-get remove ros-melodic-catkin

,因为这条指令会把你电脑的 ROS 卸载掉。别问我是怎么知道的…