ROS安装时packages have unmet dependencies问题

  • Post author:
  • Post category:其他



在ROS安装的过程中,当运行sudo apt-get install ros-***后,我们常常会遇到类似下面的错误:


Reading package lists… Done

Building dependency tree

Reading state information… Done

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-***-desktop-full : Depends: ros-***-mobile but it is not going to be installed

Depends: ros-***-perception but it is not going to be installed

Depends: ros-***-simulators but it is not going to be installed

E: Unable to correct problems, you have held broken packages.




解决方法主要有以下两种:


1. 每次安装第一个缺失的依赖包


如: sudo apt-get install ros-***-mobile ,运行该命令后可能会出现新的依赖包缺失问题,再次安装新的第一个缺失的依赖包。


如此这般,直到安装好所有的依赖包,再次执行命令


sudo apt-get install ros-***;


2. 在第一种方法解决不了的情况下使用:


sudo aptitude install ros-*** 代替  sudo apt-get install ros-***;


对于前面的提示

Accept this solution? [Y/n/q/?],选择n


直到出现类似这样的提示时,选择Y:


The following actions will resolve these dependencies:

Install the following packages:

1)     ps-engine [5.0.3.3-3+precise1 (precise)]

Accept this solution? [Y/n/q/?]


经过以上操作,问题基本可以解决。如果还是无法安装ROS,则需要具体问题具体分析。



版权声明:本文为l_h2010原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。