ros下安装gazebo提示错误

安装gazebo时
sudo apt-get install ros-kinetic-gazebo-ros-pkgs ros-kinetic-gazebo-ros-control

提示如下:
在这里插入图片描述

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
 ros-indigo-gazebo-ros-control : Depends: gazebo2 but it is not going to be installed
                                 Depends: libsdformat1 but it is not going to be installed
                                 Depends: ros-indigo-gazebo-ros but it is not going to be installed
 ros-indigo-gazebo-ros-pkgs : Depends: ros-indigo-gazebo-plugins but it is not going to be installed
                              Depends: ros-indigo-gazebo-ros but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

原因是 电脑中之前安装过新版本的gazebo8,导致冲突
将新版本删除: sudo apt-get remove gazebo8

再重新执行: sudo apt-get install ros-kinetic-gazebo-ros-pkgs ros-kinetic-gazebo-ros-control

猜你喜欢

转载自blog.csdn.net/xihuanzhi1854/article/details/87920311