背景:我尝试从 14.04 LTS 升级到 16.04 LTS,一切都很顺利,直到快结束时,我收到一条消息,说虽然升级已安装,但发生了一些错误。经过一番挖掘,似乎“ubuntu-desktop”包有一些无法解决的依赖关系。/var/log/dist-upgrade/apt.log 的输出:
Log time: 2017-01-09 10:30:59.192116
Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) qtdeclarative5-ubuntu-ui-toolkit-plugin [ amd64 ] < none -> 1.3.1918+16.04.20160404-0ubuntu1 > ( libs )
Broken qtdeclarative5-ubuntu-ui-toolkit-plugin:amd64 Depends on qml-module-ubuntu-components [ amd64 ] < none -> 1.3.1918+16.04.20160404-0ubuntu1 > ( libs )
Considering qml-module-ubuntu-components:amd64 1 as a solution to qtdeclarative5-ubuntu-ui-toolkit-plugin:amd64 0
Holding Back qtdeclarative5-ubuntu-ui-toolkit-plugin:amd64 rather than change qml-module-ubuntu-components:amd64
Investigating (0) checkbox-converged [ amd64 ] < none -> 1.2.4-0ubuntu1 > ( oldlibs )
Broken checkbox-converged:amd64 Depends on qtdeclarative5-ubuntu-ui-toolkit-plugin [ amd64 ] < none -> 1.3.1918+16.04.20160404-0ubuntu1 > ( libs )
Considering qtdeclarative5-ubuntu-ui-toolkit-plugin:amd64 0 as a solution to checkbox-converged:amd64 -1
Holding Back checkbox-converged:amd64 rather than change qtdeclarative5-ubuntu-ui-toolkit-plugin:amd64
Investigating (1) checkbox-gui [ amd64 ] < none -> 1.2.4-0ubuntu1 > ( utils )
Broken checkbox-gui:amd64 Depends on checkbox-converged [ amd64 ] < none -> 1.2.4-0ubuntu1 > ( oldlibs )
Considering checkbox-converged:amd64 -1 as a solution to checkbox-gui:amd64 0
Holding Back checkbox-gui:amd64 rather than change checkbox-converged:amd64
Investigating (1) ubuntu-desktop [ amd64 ] < 1.361 > ( metapackages )
Broken ubuntu-desktop:amd64 Depends on checkbox-gui [ amd64 ] < none -> 1.2.4-0ubuntu1 > ( utils )
Considering checkbox-gui:amd64 0 as a solution to ubuntu-desktop:amd64 0
Removing ubuntu-desktop:amd64 rather than change checkbox-gui:amd64
Done
Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) ubuntu-desktop [ amd64 ] < 1.361 > ( metapackages )
Broken ubuntu-desktop:amd64 Depends on checkbox-gui [ amd64 ] < none -> 1.2.4-0ubuntu1 > ( utils )
Considering checkbox-gui:amd64 1 as a solution to ubuntu-desktop:amd64 10000
Reinst Failed early because of qtdeclarative-abi-5-5-0:amd64
Reinst Failed because of libubuntugestures5:amd64
Reinst Failed because of qml-module-ubuntu-components:amd64
Reinst Failed because of qtdeclarative5-ubuntu-ui-toolkit-plugin:amd64
Reinst Failed because of checkbox-converged:amd64
Done
ERROR:root:failed to mark 'ubuntu-desktop' for install (E:Unable to correct problems, you have held broken packages.)
但是,我的系统在 16.04 上似乎运行良好,所以我暂时忽略了这一点。但最近,我的笔记本电脑出现了一些问题(系统字体在重新唤醒时不显示,并且在此之后无法正常关机),所以我认为最好尝试安装“ubuntu-desktop”。我使用命令行中的 synaptic 和 aptitude(而不是 apt-get)进行了一些尝试,看看它们的智能依赖解析是否有帮助,但无济于事。的输出sudo aptitude install ubuntu-desktop
与上面的 apt.log 非常相似 [编辑:根据评论中的要求完整包含在内,并且我还包含了拒绝第一个依赖关系解决建议的结果]
$ sudo aptitude install ubuntu-desktop
The following NEW packages will be installed:
checkbox-converged{a} checkbox-gui{a} libandroid-properties1{a} libhardware2{a} libhybris{a} libhybris-common1{a} libmedia1{a} liboxideqt-qmlplugin{a} liboxideqtcore0{ab} liboxideqtquick0{a}
libqt5organizer5{ab} libqt5quicktest5{a} libubuntugestures5{ab} libubuntutoolkit5{ab} libunity-webapps0{a} pyotherside{a} python3-aptdaemon.pkcompat{ab} qml-module-io-thp-pyotherside{a}
qml-module-qt-labs-folderlistmodel{a} qml-module-qt-labs-settings{a} qml-module-qtgraphicaleffects{a} qml-module-qtquick-layouts{a} qml-module-qttest{a} qml-module-ubuntu-components{ab}
qml-module-ubuntu-layouts{ab} qml-module-ubuntu-performancemetrics{a} qml-module-ubuntu-test{ab} qml-module-ubuntu-web{a} qmlscene{a} qtdeclarative5-dev-tools{a} qtdeclarative5-test-plugin{a}
qtdeclarative5-ubuntu-ui-toolkit-plugin{a} suru-icon-theme{a} ubuntu-desktop ubuntu-mobile-icons{a} unity-webapps-common{a} unity-webapps-qml{a} unity-webapps-service{a} webapp-container{ab}
webbrowser-app{ab}
0 packages upgraded, 40 newly installed, 0 to remove and 63 not upgraded.
Need to get 43.8 MB/44.2 MB of archives. After unpacking 161 MB will be used.
The following packages have unmet dependencies:
qml-module-ubuntu-test : Depends: qtbase-abi-5-5-1 which is a virtual package, provided by:
- libqt5core5a, but 5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 is installed. - libqt5core5a, but 5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 is installed.
liboxideqtcore0 : Depends: qtbase-abi-5-5-1 which is a virtual package, provided by:
- libqt5core5a, but 5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 is installed. - libqt5core5a, but 5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 is installed.
libqt5organizer5 : Depends: qtbase-abi-5-5-1 which is a virtual package, provided by:
- libqt5core5a, but 5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 is installed. - libqt5core5a, but 5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 is installed.
webapp-container : Depends: qtbase-abi-5-5-1 which is a virtual package, provided by:
- libqt5core5a, but 5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 is installed. - libqt5core5a, but 5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 is installed.
Depends: qtdeclarative-abi-5-5-0 which is a virtual package, provided by:
- libqt5qml5, but 5.6.1-4ubuntu1~xenialoverlay1~4 is installed.
qml-module-ubuntu-layouts : Depends: qtdeclarative-abi-5-5-0 which is a virtual package, provided by:
- libqt5qml5, but 5.6.1-4ubuntu1~xenialoverlay1~4 is installed.
python3-aptdaemon.pkcompat : Depends: python3-aptdaemon (= 1.1.1+bzr982-0ubuntu14) but 1.1.1+bzr982-0ubuntu16~ubuntu16.04~ppa1 is installed.
Conflicts: packagekit but 1.1.1-1ubuntu1~ubuntu16.04~ppa1 is installed.
Conflicts: packagekit:i386 but it is not going to be installed.
qml-module-ubuntu-components : Depends: qtbase-abi-5-5-1 which is a virtual package, provided by:
- libqt5core5a, but 5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 is installed. - libqt5core5a, but 5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 is installed.
Depends: qtdeclarative-abi-5-5-0 which is a virtual package, provided by:
- libqt5qml5, but 5.6.1-4ubuntu1~xenialoverlay1~4 is installed.
libubuntutoolkit5 : Depends: qtbase-abi-5-5-1 which is a virtual package, provided by:
- libqt5core5a, but 5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 is installed. - libqt5core5a, but 5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 is installed.
aptdaemon : Breaks: python3-aptdaemon.pkcompat but 1.1.1+bzr982-0ubuntu14 is to be installed.
webbrowser-app : Depends: qtbase-abi-5-5-1 which is a virtual package, provided by:
- libqt5core5a, but 5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 is installed. - libqt5core5a, but 5.6.1+dfsg-3ubuntu1~xenialoverlay1~4+fix1 is installed.
Depends: qtdeclarative-abi-5-5-0 which is a virtual package, provided by:
- libqt5qml5, but 5.6.1-4ubuntu1~xenialoverlay1~4 is installed.
libubuntugestures5 : Depends: qtdeclarative-abi-5-5-0 which is a virtual package, provided by:
- libqt5qml5, but 5.6.1-4ubuntu1~xenialoverlay1~4 is installed.
Internal error: found 2 (choice -> promotion) mappings for a single choice.
Internal error: found 2 (choice -> promotion) mappings for a single choice.
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) checkbox-converged [Not Installed]
2) checkbox-gui [Not Installed]
3) liboxideqt-qmlplugin [Not Installed]
4) liboxideqtcore0 [Not Installed]
5) liboxideqtquick0 [Not Installed]
6) libqt5organizer5 [Not Installed]
7) libubuntugestures5 [Not Installed]
8) libubuntutoolkit5 [Not Installed]
9) libunity-webapps0 [Not Installed]
10) python3-aptdaemon.pkcompat [Not Installed]
11) qml-module-ubuntu-components [Not Installed]
12) qml-module-ubuntu-layouts [Not Installed]
13) qml-module-ubuntu-test [Not Installed]
14) qml-module-ubuntu-web [Not Installed]
15) qtdeclarative5-ubuntu-ui-toolkit-plugin [Not Installed]
16) ubuntu-desktop [Not Installed]
17) unity-webapps-common [Not Installed]
18) unity-webapps-qml [Not Installed]
19) unity-webapps-service [Not Installed]
20) webapp-container [Not Installed]
21) webbrowser-app [Not Installed]
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Install the following packages:
1) liboxideqtcore0 [1.13.6-0ubuntu1 (xenial)]
Keep the following packages at their current version:
2) checkbox-converged [Not Installed]
3) checkbox-gui [Not Installed]
4) liboxideqt-qmlplugin [Not Installed]
5) liboxideqtquick0 [Not Installed]
6) libqt5organizer5 [Not Installed]
7) libubuntugestures5 [Not Installed]
8) libubuntutoolkit5 [Not Installed]
9) libunity-webapps0 [Not Installed]
10) python3-aptdaemon.pkcompat [Not Installed]
11) qml-module-ubuntu-components [Not Installed]
12) qml-module-ubuntu-layouts [Not Installed]
13) qml-module-ubuntu-test [Not Installed]
14) qml-module-ubuntu-web [Not Installed]
15) qtdeclarative5-ubuntu-ui-toolkit-plugin [Not Installed]
16) ubuntu-desktop [Not Installed]
17) unity-webapps-common [Not Installed]
18) unity-webapps-qml [Not Installed]
19) unity-webapps-service [Not Installed]
20) webapp-container [Not Installed]
21) webbrowser-app [Not Installed]
Downgrade the following packages:
22) oxideqt-codecs-extra [1.19.4-0ubuntu0.16.04.1 (now, xenial-security, xenial-updates) -> 1.13.6-0ubuntu1 (xenial)]
Accept this solution? [Y/n/q/?] n
我认为这可能与这里的启动板问题有关https://answers.launchpad.net/ubuntu/+question/433070这不可避免地指出了 qtbase-abi-5-5-1 和 qtbase-abi-5-6-1 之间存在一些冲突,但我没有专业知识来最终确定这一点。从我的输出来看,我的 Qt 库(我从未弄乱过)肯定出了问题。
为了完整性:
$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
答案1
如果另一个 Ubuntu 互联网漫游者偶然遇到与上述类似的问题,并想知道是否需要全新安装,那么对于我的情况,答案是肯定的。如果您有合适的备份,那么这真的不是太麻烦。只需确保您不会用“纯数据”以外的任何东西污染您的新安装。我已经开始使用虚拟机,在其中安装第三方软件,以便将它们“沙盒化”并将它们与我的主机操作系统隔离开来,我试图尽可能保持原始状态,以便将来的升级顺利进行。
看https://ubuntuforums.org/showthread.php?t=2350343在 UbuntuForums 上找到对我的问题更深入的解答。