我是新手,大约三天前安装了 Kubuntu,并尝试安装一些程序,但至今没有成功。无论我尝试安装什么,我都会遇到相同的错误。如果有人能解释发生了什么以及如何解决它,或者向我指出可以提供帮助的文档,我将不胜感激。
在此先感谢您的帮助,
诺埃尔
sudo apt-get install muon
[sudo] password for nleric:
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:
muon : Depends: apt-xapian-index but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
答案1
自 Ubuntu 16.04 Xenial 以来,软件包“apt-xapian-index”就位于 universe 存储库中(参见http://packages.ubuntu.com/xenial/apt-xapian-index)。在 Ubuntu 16.04 Xenial 之前,软件包“apt-xapian-index”位于主存储库中,因此即使用户禁用了“universe”存储库,它始终可用。现在情况不再如此。
要确认上述内容,只需运行以下命令:
apt-cache policy apt-xapian-index
如果结果不可用,那是因为 apt-get 无法在文件 /etc/apt/sources.list 中的现有存储库中找到它。
我猜您已从 APT /etc/apt/sources.list 文件中删除/禁用了 universe 存储库。请确保在该文件中以“deb”开头的行末尾添加“universe”。例如,在文件 /etc/apt/sources.list 中更改以下行以启用 universe 存储库:
deb http://archive.ubuntu.com/ubuntu/ xenial main
类似于(添加行中的最后一个单词):
deb http://archive.ubuntu.com/ubuntu/ xenial main universe
然后更新 apt-get 存储库:
sudo apt-get update
Apt-get 将更新其可用软件包源,现在已启用 universe 存储库。然后尝试修复问题:
sudo apt-get install -f