catkin_make编译的几个错误

1.权限问题

报错:

Makefile:138: recipe for target ‘all’ failed
Makefile:138: recipe for target ‘all’ failed make: *** [all] Error 2
Invoking “make -j8 -l8” failed

解决方法:

username@username:~/工程包名/src$ sudo chmod -R +x /home/username/工程包名/

替换username为自己虚拟机的用户名即可。

2.catkin_make编译出错:找不到包

cv_bridgeConfig.cmake
cv_bridge-config.cmake

安装对应ros版本的cv-bridge包:$ sudo apt-get install ros-kinetic-cv-bridge

3.报错:

Could not find the required component 'geographic_msgs'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "geographic_msgs"
  with any of the following names:
 
    geographic_msgsConfig.cmake
    geographic_msgs-config.cmake
 
  Add the installation prefix of "geographic_msgs" to CMAKE_PREFIX_PATH or
  set "geographic_msgs_DIR" to a directory containing one of the above files.
  If "geographic_msgs" provides a separate development package or SDK, be
  sure it has been installed.

解决方法:

sudo apt-get install ros-kinetic-geographic-msgs

4.报错:

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

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

    MRPTConfig.cmake
    mrpt-config.cmake

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

解决方法:

$ sudo apt-get install ros-kinetic-mrpt*
$ sudo apt-get install mrpt-*
$ sudo apt-get install libmrpt-dev

5.报错:

catkin_make编译的几个错误_第1张图片

解决方法:

sudo apt-get install ros-kinetic-joy*

 6.有关move_base的报错:

解决方法:

sudo apt-get install ros-<版本>-navigation

7.报错

-- Could NOT find turtlesim (missing: turtlesim_DIR)
-- Could not find the required component 'turtlesim'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "turtlesim" with
  any of the following names:

    turtlesimConfig.cmake
    turtlesim-config.cmake

  Add the installation prefix of "turtlesim" to CMAKE_PREFIX_PATH or set
  "turtlesim_DIR" to a directory containing one of the above files.  If
  "turtlesim" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  shuai_service/CMakeLists.txt:10 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/shuai/catkin_shuai/build/CMakeFiles/CMakeOutput.log".
See also "/home/shuai/catkin_shuai/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

sudo apt-get install ros-<版本>-turtlesim

你可能感兴趣的:(ROS,服务器,运维)