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

我最近安装了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成功sudo apt-get install dolphin 。 但我失败了muonkontact 。 以下是我为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 Package Manager找到并重新安装损坏的软件包 ,但没有运气。 应用更改给了我这个对话框:

 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 

任何帮助将受到高度赞赏。

这似乎是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更多详细信息,我建议这个答案 。

几个月后! 在我的14.10 Ubuntu中破解了软件包,并没有找到解决问题的方法(我已经尝试了你在谷歌搜索结果的前10页中找到的所有解决方案),我意外地找到了如何解决它的真实问题:Just转到启动菜单中的“恢复模式”, 启用网络连接并运行“修复损坏的包”选项。 这需要一段时间,但它完全解决了问题。