如何修复或重新安装因安装更新而导致的损坏的软件包?

如何修复或重新安装因安装更新而导致的损坏的软件包?

我最近安装了 Kubuntu 14.04,并安装了可用的更新。然后,我得到了一个黑屏,鼠标指针可见。我失去了桌面。但是我使用 进入了终端Ctrl+Alt+F1。然后我运行sudo apt-get install kubuntu-desktop。它让我恢复了桌面。

不幸的是,我发现一些应用程序损坏或缺失,例如 muon、dolphin、kontact、ktp-contactlist 等。我尝试过关于 package 和 apt 命令的一些技巧。什么都没起作用。sudo apt-get updatesudo apt-get upgrade没有解决问题。什么都没有升级。

我可以成功安装海豚通过运行sudo apt-get install dolphin。但我在muon和方面失败了kontact。以下是我尝试的muon

sithu@sithu-kubuntu:~$ sudo apt-get install muon
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: libmuonprivate2 (= 2.2.0-0ubuntu3) but it is not going to be installed
    Recommends: muon-updater but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我尝试安装libmuonprivate2,但这取决于software-properties-kde

sithu@sithu-kubuntu:~$ sudo apt-get install libmuonprivate2
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:
libmuonprivate2 : Depends: software-properties-kde but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我尝试安装software-properties-kde,但这取决于python3-software-properties

sithu@sithu-kubuntu:~$ sudo apt-get install software-properties-kde
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:
software-properties-kde : Depends: python3-software-properties (= 0.92.36) but 0.92.37.1 is to be installed
E: Unable to correct problems, you have held broken packages.

我尝试安装python3-software-properties,但它似乎是最新的。

sithu@sithu-kubuntu:~$ sudo apt-get install python3-software-properties
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-software-properties is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

我也尝试过使用以下方法找到并重新安装损坏的软件包Synaptic 软件包管理器,但没有运气。应用更改后,我得到了以下对话框:

Could not apply changes!
Fix broken packages first.

“修复损坏的软件包”给了我这个对话框:

E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

任何帮助都将非常感激。

答案1

这似乎是python3-software-properties软件包或其某些配置文件的问题,可能会向 提供不准确的信息apt-get。因此,我建议您清除此软件包:

sudo apt-get purge python3-software-properties

然后安装muon

sudo apt-get install muon

后面的命令将强制全新安装python3-software-properties其他muon可能依赖的软件包。

有关更多详细信息apt-get purge,我建议这个答案

答案2

经过...几个月!我的 14.10 Ubuntu 中的软件包损坏了,并且没有找到任何解决问题的方法(我尝试了谷歌搜索结果前 10 页中可以找到的所有解决方案),我偶然发现了如何真正解决问题:只需进入启动菜单中的“恢复模式”,启用网络连接并运行“修复损坏的软件包”选项。这需要一段时间,但可以完全解决问题。

相关内容