ROS问题:The following packages have unmet dependencies

        今天在安装ROS时,遇到如下问题:

$ sudo apt-get install ros-kinetic-desktop-full

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-kinetic-desktop-full : Depends: ros-kinetic-simulators but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

 分析原因:这个问题主要是由于镜像源不正确导致。

解决方案

(1) 点开Software & Updates->Other Software,将打钩的取消掉,类似下图:

(2)删除ros-latest.list

rm -rf /etc/apt/sources.list.d/ros-latest.list

(3)修改源:

gedit /etc/apt/sources.list

在该文件末尾添加如下内容:

deb http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse

(4)接下来从第一步——设置安装源那里开始,从头安装即可,可参考这篇博客

【2020-6-18补充】安装qt57creator时遇到如下问题:

$ sudo apt-get install qt57creator

The following packages have unmet dependencies:
 qt57creator : Depends: qt57qbs but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

解决方案

$ sudo apt-get install qt57qbs

等待安装完成后,就可以正常安装qt57creator了。

参考网址

ubuntu16.04 安装ros 提示Depends

Ubuntu官网help

猜你喜欢

转载自blog.csdn.net/JIEJINQUANIL/article/details/106446821