catkin_make报错Invoking "make cmake_check_build_system" failed
按照官网的要求安装好了ROS Melodic(Ubuntu18.04.5),但是catkin_make命令一直报错。
网上虽然有很多catkin_make报错的解决办法,但是没有出现我这个报错信息的。
Invoking "make cmake_check_build_system" failed
还是需要从具体报错信息里面看,
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "rospy" with any of
the following names:
rospyConfig.cmake
rospy-config.cmake
Add the installation prefix of "rospy" to CMAKE_PREFIX_PATH or set
"rospy_DIR" to a directory containing one of the above files. If "rospy"
provides a separate development package or SDK, be sure it has been
installed.
缺少rospy
软件包。
网上有大佬针对提示缺少gazebo_ros_control
功能包给出的解决方案是
sudo apt-get install ros-kinetic-gazebo-ros-control
依样画葫芦写了我的安装命令
sudo apt-get install ros-melodic-rospy
之后再运行catkin_make
就没有报错信息了。
网上搜到的catkin_make报错类型五花八门,我也不清楚为什么同样的安装方式会出现不同软件包的缺失。自己解决问题的经验是要多看看自己电脑的详细报错信息,找到准确的缺失内容以后再去找方法。