我ppa:kubuntu-ppa/backports
按常规方式添加,然后执行dist-upgrade
。它需要下载超过 GB 的文件,所以我把它留到下午。回来后,我发现系统变得非常不稳定且无法使用。
我登录控制台并从那里重新启动它,当我回来时,事情有点混乱。
我运行sudo apt-get -f dist-upgrade
后发现输出内容如下:
The following packages will be upgraded:
kdm
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/2,227 kB of archives.
After this operation, 1,668 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
dpkg: dependency problems prevent configuration of kdm:
kdm depends on kde-workspace-kgreet-plugins (= 4:4.8.5-0ubuntu0.3); however:
Version of kde-workspace-kgreet-plugins on system is 4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1.
kde-workspace-data (4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1) breaks kdm (<< 4:4.10.80) and is installed.
Version of kdm to be configured is 4:4.8.5-0ubuntu0.3.
dpkg: error processing kdm (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of kubuntu-desktop:
kubuntu-desktop depends on kdm; however:
Package kdm is not configured yet.
dpkg: error processing kubuntu-desktop (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports has already been reached
No apport report written because MaxReports has already been reached
Errors were encountered while processing:
kdm
kubuntu-desktop
E: Sub-process /usr/bin/dpkg returned an error code (1)
理想情况下,我希望满足依赖关系,因此如果可能的话,有人可以建议如何做到这一点吗?如果做不到,请建议如何恢复到以前的配置。
谢谢。
使用内核为 3.8.0-34-generic 的 Ubuntu 12.04 #49~precise1-Ubuntu
** 更新 **
peter@pete:~$ sudo apt-get check
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run ‘apt-get -f install’ to correct these.
The following packages have unmet dependencies.
kde-workspace-data : Breaks: kdm (< 4:4.10.80) but 4:4.8.5-0ubuntu0.3 is installed
kdm : Depends: kde-workspace-kgreet-plugins (= 4:4.8.5-0ubuntu0.3) but 4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1 is installed
E: Unmet dependencies. Try using -f.
peter@pete:~$
peter@pete:~$
peter@pete:~$ sudo apt-get -f check
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
更新2
peter@pete:~$ apt-cache policy kde-workspace-data kdm
kde-workspace-data:
Installed: 4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1
Candidate: 4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1
Version table:
*** 4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1 0
500 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/ precise/main i386 Packages
100 /var/lib/dpkg/status
4:4.11.1-0ubuntu1~ubuntu12.04.1~ppa3 0
500 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/ precise/main i386 Packages
4:4.11.0-0ubuntu1~ubuntu12.04~ppa1 0
500 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/ precise/main i386 Packages
4:4.10.5-0ubuntu0.1~ubuntu12.04~ppa2 0
500 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/ precise/main i386 Packages
4:4.8.5-0ubuntu0.3 0
500 http://free.nchc.org.tw/ubuntu/ precise-updates/main i386 Packages
4:4.8.2a-0ubuntu4 0
500 http://free.nchc.org.tw/ubuntu/ precise/main i386 Packages
kdm:
Installed: 4:4.8.5-0ubuntu0.3
Candidate: 4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1
Version table:
4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1 0
500 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/ precise/main i386 Packages
*** 4:4.8.5-0ubuntu0.3 0
500 http://free.nchc.org.tw/ubuntu/ precise-updates/main i386 Packages
100 /var/lib/dpkg/status
4:4.8.2a-0ubuntu4 0
500 http://free.nchc.org.tw/ubuntu/ precise/main i386 Packages
更新 3
peter@pete:~$ sudo apt-get install kde=4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1 kde-workspace-data=4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1 kde-workspace-kgreet-plugins=4:4.11.kspace-data=4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1 kde-workspace-kgreet-plugins=4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version ‘4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1’ for ‘kde’ was not found
peter@pete:~$
peter@pete:~$ apt-cache policy kde-workspace-data kdekde-workspace-data:
Installed: 4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1
Candidate: 4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1
Version table:
*** 4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1 0
500 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/ precise/main i386 Packages
100 /var/lib/dpkg/status
4:4.11.1-0ubuntu1~ubuntu12.04.1~ppa3 0
500 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/ precise/main i386 Packages
4:4.11.0-0ubuntu1~ubuntu12.04~ppa1 0
500 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/ precise/main i386 Packages
4:4.10.5-0ubuntu0.1~ubuntu12.04~ppa2 0
500 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/ precise/main i386 Packages
4:4.8.5-0ubuntu0.3 0
500 http://free.nchc.org.tw/ubuntu/ precise-updates/main i386 Packages
4:4.8.2a-0ubuntu4 0
500 http://free.nchc.org.tw/ubuntu/ precise/main i386 Packages
kde:
Installed: (none)
Candidate: (none)
Version table:
更新 4
peter@pete:~$ sudo apt-get -f install kdm=4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1 kde-workspace-data=4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1 kde-workspace-kgreet-plugins=4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1
Reading package lists... Done
Building dependency tree
Reading state information... Done
kde-workspace-data is already the newest version.
kde-workspace-data set to manually installed.
kde-workspace-kgreet-plugins is already the newest version.
kde-workspace-kgreet-plugins set to manually installed.
The following packages were automatically installed and are no longer required:
libkasten1controllers1 libnepomukdatamanagement4 libkface1 libkexiv2-10
libkdegames5a libkipi8 libkggzgames4 libopencv-legacy2.3 ttf-dustin
libkasten1okteta1core1 libkggznet4 libkggzmod4 libopencv-video2.3
libkasten1okteta1gui1 libkasten1okteta1controllers1 libanalitza4abi1
libkwinnvidiahack4 ktron libkdecorations4 libkwinglutils1 libkasten1core1
rdesktop libboost-graph1.46.1 libnepomuksync4 libopenctl0.8 libokularcore1abi1
libindi0 libkasten1gui1 kbattleship libplasmaclock4abi3 libkdcraw20
libanalitzagui4abi1 libattica0.3 kdevplatform5-libs liblastfm0
libsolidcontrolifaces4abi2 libsublime5 libkwineffects1abi3
Use 'apt-get autoremove' to remove them.
The following packages will be upgraded:
kdm
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/2,227 kB of archives.
After this operation, 1,668 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
dpkg: dependency problems prevent configuration of kdm:
kdm depends on kde-workspace-kgreet-plugins (= 4:4.8.5-0ubuntu0.3); however:
Version of kde-workspace-kgreet-plugins on system is 4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1.
kde-workspace-data (4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1) breaks kdm (<< 4:4.10.80) and is installed.
Version of kdm to be configured is 4:4.8.5-0ubuntu0.3.
dpkg: error processing kdm (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
dpkg: dependency problems prevent configuration of kubuntu-desktop:
kubuntu-desktop depends on kdm; however:
Package kdm is not configured yet.
dpkg: error processing kubuntu-desktop (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
Errors were encountered while processing:
kdm
kubuntu-desktop
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
所有软件包必须是同一版本:
sudo apt-get update
sudo apt-get install kdm=4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1 kde-workspace-data=4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1 kde-workspace-kgreet-plugins=4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1
此后您应该再次检查:sudo apt-get check
。应该没有任何其他错误。
如果由于某种原因上述解决方案不起作用,请使用aptitude
:
sudo apt-get install aptitude
sudo aptitude -f install
它应该会向您展示一系列可能的解决方案,选择不卸载任何软件包和/或升级软件包的解决方案。我目前无法提供示例。
怀疑:我相信kde-workspace-data
更新得太晚了,可能会破坏一些东西(kdm),但由于某种原因,kdm 不是同一版本(该死的 PPA 维护者),因此安装4:4.8.5-0ubuntu0.3
和升级 kdm 应该可以解决问题:
sudo apt-get install kdm=4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1 kde-workspace-data=4:4.8.5-0ubuntu0.3 kde-workspace-kgreet-plugins=4:4.11.3-0ubuntu0.1~ubuntu12.04~ppa1
答案2
软件包可能处于非常糟糕的不一致状态,您应该通过以下方式重新安装它 -
sudo apt-get --reinstall install kubuntu-desktop
并重新启动一次,希望它能工作。如果不行,请通过以下方式禁用 kubuntu backports 存储库,Software & Updates > Other Sources
然后尝试
sudo apt-get update
sudo apt-get install kubuntu-desktop
这次它可以起作用了。