catkin_make编译出现错误:Could not find a package configuration file provided by “move_base_msgs“

从github下载别人的包,忘记先安装依赖了,直接在工作空间下编译出现了以下错误:

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

    move_base_msgsConfig.cmake
    move_base_msgs-config.cmake

截图如下:

catkin_make编译出现错误:Could not find a package configuration file provided by “move_base_msgs“_第1张图片

 解决方法:

其实在编译错误出也提醒了解决方法,

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

安装依赖项"move_base_msgs" ,如果缺少其他的依赖项也是安装相应的,执行以下命令

sudo apt-get install ros-melodic-move-base-msgs

melodic是ubuntu1804对应的版本号,如果是其他版本的,请改为对应的即可。

参考链接:http://t.csdn.cn/6AUyc

你可能感兴趣的:(虚拟机上装Ubuntu配置,Linux,ubuntu)