打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
[catkin build] catkinConfig.cmake_“add the installation prefix of \”catkin\" to cmak

今天catkin build 整个工程,编译catkin_tools_prebuild时遇到失败的情况,如下:

The catkin CMake module was not found, but it is required to build a linked
  workspace.  To resolve this, please do one of the following, and try
  building again.

 

   1. Source the setup.sh file from an existing catkin workspace:
      source SETUP_FILE

 

   2. Extend another catkin workspace's result (install or devel) space:
      catkin config --extend RESULT_SPACE

 

   3. Set `catkin_DIR` to the directory containing `catkin-config.cmake`:
      catkin config --cmake-args -Dcatkin_DIR=CATKIN_CMAKE_CONFIG_PATH

 

   4. Add the catkin source package to your workspace's source space:
      cd SOURCE_SPACE && git clone https://github.com/ros/catkin.git

 

根据提示的解决办法就是,加上下面的命令:

catkin config --extend /opt/ros/kinetic

原因分析:

出现上面的错误是由于你的编译环境没有找到ros,catkin config --extend 就是指定ros环境路径.。

我的ros环境就是/opt/ros/kinetic

 

------------------------------------还有下面的错误提示

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.

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
<font style="vertical-align: inherit;"><font style="vertical-align: inherit;">rosdep</font></font>
Installing OpenCV 2.1 in Ubuntu – Sebastian M...
libtsmux INSTALL文件阅读---关于编译和安装的说明
ROS编译教程.1
Linux系统安装 OpenSSL两种方法
CMake快速入门教程:实战
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服