关于可能重复的注意事项:
AFAIK,这与添加PPA后如何解决未满足的依存关系不是重复的?否则,请使用那里的任何答案解决下面提到的测试问题,以证明这一点。
背景:
在如何在64位Ubuntu 14.04.3LTS上修复安装Wine之前,我曾遇到此问题。通过手动/人工检查目标包(wine
)的所有递归依赖性解决了该问题。
重现问题(测试用例):
让我们以仅1个故障包的方式创建一种安静的简化情况。
- 在VirtualBox上安装新的Ubuntu 14.04。
- 打开
software-properties-gtk
并启用backports
存储库。 获取最后的包裹清单
sudo apt-get update
运行
apt-get -s install wine
以确认wine
可以安装。libcgmanager0
从反向端口安装问题软件包$ apt-cache policy libcgmanager0 libcgmanager0: Installed: 0.24-0ubuntu5 Candidate: 0.24-0ubuntu7.5 Version table: 0.39-2ubuntu2~ubuntu14.04.1 0 100 http://dz.archive.ubuntu.com/ubuntu/ trusty-backports/main amd64 Packages 0.24-0ubuntu7.5 0 500 http://dz.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages 0.24-0ubuntu7.1 0 500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages *** 0.24-0ubuntu5 0 500 http://dz.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages 100 /var/lib/dpkg/status
强制
apt
安装libcgmanager0
版本0.39-2ubuntu2~ubuntu14.04.1
sudo apt-get install libcgmanager0=0.39-2ubuntu2~ubuntu14.04.1
现在,我们从后台提到的问题中最终遇到了与用户相同的情况,wine安装因未满足依赖项而失败,仅显示了一级依赖项软件包。
apt-get -s install wine
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: wine : Depends: wine1.6 but it is not going to be installed E: Unable to correct problems, you have held broken packages.
apt-get -s install wine1.6
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: wine1.6 : Depends: wine1.6-i386 (= 1:1.6.2-0ubuntu4) E: Unable to correct problems, you have held broken packages.
apt-get -s install wine1.6-i386
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: wine1.6-i386:i386 : Depends: libglu1-mesa:i386 but it is not going to be installed or libglu1:i386 Depends: libgphoto2-6:i386 (>= 2.5.2) but it is not going to be installed Depends: libgphoto2-port10:i386 (>= 2.5.2) but it is not going to be installed Recommends: libsane:i386 but it is not going to be installed E: Unable to correct problems, you have held broken packages.
apt-get install
逐一跟踪依赖关系是不切实际的。
理想的解决方案:
真正的问题在这里
apt
无法安装libcgmanager0:i386
版本0.39-2ubuntu2~ubuntu14.04.1
,因为反向移植库中的较低的优先级100
小于版本0.24-0ubuntu7.5
从updates
存储库500
apt
无法安装libcgmanager0:i386
版本,0.24-0ubuntu7.5
因为libcgmanager0:amd64
安装了其他版本0.39-2ubuntu2~ubuntu14.04.1
最快的修复是,强制从反向端口安装相同的i386版本
sudo apt-get install libcgmanager0:i386=0.39-2ubuntu2~ubuntu14.04.1
或将其(amd64)降级为常规存储库中的任何版本
sudo apt-get install libcgmanager0=0.24-0ubuntu7.5
我尝试过的方式/工具:
- 禁用PPA与该问题无关。
aptitude
在交互模式下使用时,仅带来带有许多删除项的解决方案(> 200 !!!)。apt-get install
在依赖关系树之后手动使用。不切实际,因为第一级和第二级依赖项并未引发有关冲突的有意义的消息。debfoster
可以生成递归依赖项,但仅适用于已安装的软件包。但是wine
尚未安装。
主题/我的兴趣:
假设我想在不知道libcgmanager0
软件包问题(或完全libcgmanager0:amd64=0.39-2ubuntu2~ubuntu14.04.1
已经安装的问题)的情况下安装wine 。
我正在寻找一种调试方法或一种方法来了解麻烦的程序包的名称并快速了解发生了什么。
一般如何调试未满足的依赖项问题?
可能有一些新的选项
dpkg
/apt
/aptitude
该跟踪内部依赖解析器。这可以libcgmanager0
在其输出中显示。如果对此没有规范的答案,请问有人可以向我展示一种更好的方法来生成递归依赖项列表或模拟具有更多细节的依赖项解析器,以帮助解决问题吗?
为什么所有依赖项?因为我想一次检查所有软件包的以下命令的输出。
apt-cache policy <all-dependencies>
apt-get -s install <all-dependencies>
libcgmanager
,而是依赖关系?您提到了递归列出依赖关系。你试过了apt-rdepends
吗?
wine
(或其他受影响的软件包)会-o Debug::pkgProblemResolver=yes
怎样?
backports
版本?