当前位置:   article > 正文

ROS问题:The following packages have unmet dependencies_the following packages have unmet dependencies:

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

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

  1. deb http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
  2. deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
  3. deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
  4. deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
  5. deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
  6. deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
  7. deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
  8. deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
  9. deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
  10. 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

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/代码探险家/article/detail/816865
推荐阅读
  

闽ICP备14008679号