在 Ubuntu 12.10 上尝试
sudo apt-get install mono-complete
要安装 mono,我得到:
enter codReading 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:
mono-complete : Depends: mono-devel (= 2.10.8.1-5ubuntu1) but it is not going to be installed
Depends: libmono-cil-dev (= 2.10.8.1-5ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我尝试删除 mono-devel 和 libmono-cil-dev,但它们没有安装。
我试过了
sudo apt-get clean && apt-get update && apt-get upgrade
但这没有帮助。
dpkg --get-selections | grep hold
没有给出任何结果,所以似乎没有包实际上握住。
我也尝试过
dpkg --configure -a
和
apt-get install -f
但这两者都没有帮助。
但奇怪的是,我做在 /usr/bin/mono 中安装了 mono。我陷入这种困境的原因是,我尝试按照此处的说明获取最新版本:http://www.meebey.net/posts/mono_3.0_preview_debian_ubuntu_packages/apt-get 抱怨说有软件包被挂起,这时我
sudo apt-get dist-upgrade
我不知道这是否是导致我当前问题的原因。无论如何,在它继续抱怨软件包被扣留后,我从我的源中删除了那个实验性的 mono deb 源并删除了 mono-complete,然后运行 apt-get clean、update 和 upgrade,以恢复空白状态。此时,我尝试从空白状态安装 mono-complete,并遇到了我目前的情况。
编辑:
$ apt-cache policy mono-devel libmono-cil-dev
mono-devel:
Installed: (none)
Candidate: 2.10.8.1-5ubuntu1
Version table:
2.10.8.1-5ubuntu1 0
500 http://us.archive.ubuntu.com/ubuntu/ quantal/main i386 Packages
100 /var/lib/dpkg/status
libmono-cil-dev:
Installed: (none)
Candidate: 2.10.8.1-5ubuntu1
Version table:
2.10.8.1-5ubuntu1 0
500 http://us.archive.ubuntu.com/ubuntu/ quantal/main i386 Packages
链接实验页面的 @meebey 建议使用 apt-get remove cli-common 来完全删除单声道,其输出如下:
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:
mono-xsp4 : Depends: mono-xsp4-base (= 2.10-2.1) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
解决 我通过重新添加实验性 ppa 并删除 mono-complete 和 cli-common 解决了这个问题。然后我再次删除了实验性 ppa,这让我回到了一片空白。因此,我不认为这是一个重复的问题,但这并不重要。