错误
我正在尝试在我的电脑上安装 ros 桌面完整版,如下所示 这些步骤一切都很好,直到步骤 1.4,准确地说
sudo apt-get install ros-kinetic-desktop-full
我出现以下错误:
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-desktop but it is not going to be installed
Depends: ros-kinetic-simulators but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
依赖树
我将在这里报告整个依赖关系树,其中我使用命令sudo apt-get install
来处理每个列表元素左侧的所有依赖关系。我首先遵循模拟器的依赖关系:
- ros-kinetic-desktop-full:依赖:ros-kinetic-simulators
- ros-kinetic-simulators:依赖:ros-kinetic-rqt-common-plugins
- ros-kinetic-rqt-common-plugins:依赖:ros-kinetic-rqt-web
- ros-kinetic-rqt-web:依赖:ros-kinetic-webkit-dependency
- ros-kinetic-webkit-dependency:依赖:python-pyqt5.qtwebkit
- python-pyqt5.qtwebkit:依赖:python-pyqt5(= 5.8.2+dfsg-1+16.04+xenial+build19)但需要安装 5.8.2+dfsg-1+16.04+xenial+build21 E:无法纠正问题,您持有损坏的软件包。
然后我遵循桌面依赖关系:
- ros-kinetic-desktop :依赖:ros-kinetic-viz
- ros-kinetic-viz:依赖:ros-kinetic-rqt-common-plugins
- ros-kinetic-rqt-common-plugins:依赖:ros-kinetic-rqt-web
- ros-kinetic-rqt-web:依赖:ros-kinetic-webkit-dependency
- ros-kinetic-webkit-dependency:依赖:python-pyqt5.qtwebkit
- python-pyqt5.qtwebkit:依赖:python-pyqt5(= 5.8.2+dfsg-1+16.04+xenial+build19)但需要安装 5.8.2+dfsg-1+16.04+xenial+build21 E:无法纠正问题,您持有损坏的软件包。
如你所见,两者都指向同一个包。但是当使用
sudo apt-get install python-pyqt5
我明白了
python-pyqt5已经是最新版本(5.8.2+dfsg-1+16.04+xenial+build21)。
我尝试过的方法
手动将以下 deb 添加到/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
使用以下命令安装 python-pyqt5
pip3 install pyqt5
使用 apt 多次升级、更新、dist-update
安装时
ros-kinetic-ros-base
没有给出依赖项错误使用
sudo apt-get install python-pyqt5=5.8.2+dfsg-1+16.04+xenial+build19
在接受安装之前提供以下输出:Reading package lists... Done Building dependency tree Reading state information... Done Starting pkgProblemResolver with broken count: 1 Starting 2 pkgProblemResolver with broken count: 1 Investigating (0) python-pyqt5.qtsvg [ amd64 ] < 5.8.2+dfsg-1+16.04+xenial+build21 > ( python ) Broken python-pyqt5.qtsvg:amd64 Depends on python-pyqt5 [ amd64 ] < 5.8.2+dfsg-1+16.04+xenial+build21 -> 5.8.2+dfsg-1+16.04+xenial+build19 | 5.8.2+dfsg-1+16.04+xenial+build21 > ( python )(= 5.8.2+dfsg-1+16.04+xenial+build21) Considering python-pyqt5:amd64 10002 as a solution to python-pyqt5.qtsvg:amd64 1 Removing python-pyqt5.qtsvg:amd64 rather than change python-pyqt5:amd64 Investigating (0) ros-kinetic-python-qt-binding [ amd64 ] < 0.3.3-0xenial-20171104-175930-0800 > ( misc ) Broken ros-kinetic-python-qt-binding:amd64 Depends on python-pyqt5.qtsvg [ amd64 ] < 5.8.2+dfsg-1+16.04+xenial+build21 > ( python ) Considering python-pyqt5.qtsvg:amd64 1 as a solution to ros-kinetic-python-qt-binding:amd64 0 Removing ros-kinetic-python-qt-binding:amd64 rather than change python-pyqt5.qtsvg:amd64 Investigating (0) ros-kinetic-rviz [ amd64 ] < 1.12.15-0xenial-20180105-172609-0800 > ( misc ) Broken ros-kinetic-rviz:amd64 Depends on ros-kinetic-python-qt-binding [ amd64 ] < 0.3.3-0xenial-20171104-175930-0800 > ( misc ) Considering ros-kinetic-python-qt-binding:amd64 0 as a solution to ros-kinetic-rviz:amd64 -1 Removing ros-kinetic-rviz:amd64 rather than change ros-kinetic-python-qt-binding:amd64 Done Suggested packages: python-pyqt5-dbg The following packages will be REMOVED: python-pyqt5.qtsvg ros-kinetic-python-qt-binding ros-kinetic-rviz The following packages will be DOWNGRADED: python-pyqt5 0 upgraded, 0 newly installed, 1 downgraded, 3 to remove and 0 not upgraded. Need to get 2.143 kB of archives
更多信息
我有KDE neon LTS 5.8安装规格如下:
- KDE Plasma 版本:5.8.8
- KDE 框架版本:5.42.0
- Qt 版本:5.7.1
- 内核版本:4.13.0-29-generic
- 操作系统类型:64位
在这里我将列出我认为可能有用的每个命令及其输出:
$ cat /etc/apt/sources.list.d/ros-latest.list
deb http://packages.ros.org/ros/ubuntu xenial main
$ uname -a
Linux Ublion16 4.13.0-26-generic #29~16.04.2-Ubuntu SMP Tue Jan 9 22:00:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ apt-cache policy python-pyqt5
python-pyqt5:
Installed: 5.8.2+dfsg-1+16.04+xenial+build21
Candidate: 5.8.2+dfsg-1+16.04+xenial+build21
Version table:
*** 5.8.2+dfsg-1+16.04+xenial+build21 500
500 http://archive.neon.kde.org/user/lts xenial/main amd64 Packages
100 /var/lib/dpkg/status
5.8.2+dfsg-1+16.04+xenial+build19 500
500 http://archive.neon.kde.org/user/lts xenial/main amd64 Packages
5.8.2+dfsg-1+16.04+xenial+build13 500
500 http://archive.neon.kde.org/user/lts xenial/main amd64 Packages
5.7+dfsg-3+16.04+build8 500
500 http://archive.neon.kde.org/user/lts xenial/main amd64 Packages
5.5.1+dfsg-3ubuntu4 500
500 http://it.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
500 http://mirrors.ustc.edu.cn/ubuntu xenial/universe amd64 Packages
答案1
我刚刚遇到了一个与你非常相似的问题,但我通过添加解决了它
deb http://cz.archive.ubuntu.com/ubuntu xenial main universe
到 /etc/apt/sources.list 的开头。注意这句话中的“xenial”一词,它应该与您的 Ubuntu 版本相同。如果它不适合您,我建议您先删除 /etc/apt/sources.list.d/ros-latest.list,然后重试。
答案2
将以下软件包源添加到 /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
现在,按照本指南中 1.2 的步骤操作关联