我正在使用 Ubuntu 16.04 LTS,我运行了它,do-release-upgrade -d
但是升级失败并出现一条错误消息,提示软件包具有未满足的依赖关系。
sudo apt-get -f install
并且sudo apt update && sudo apt upgrade
也无法修复错误。
以下是完整的错误消息:
Correcting dependencies... failed.
The following packages have unmet dependencies:
checkbox-converged : Depends: qtdeclarative5-ubuntu-ui-toolkit-plugin but it is not installable
gnome-calendar : Depends: gsettings-desktop-schemas (>= 3.21.2) but 3.18.1-1ubuntu1 is installed
gnome-session : Depends: gnome-shell (>= 3.25.91-0ubuntu4~) but it is not installed
Depends: gnome-session-bin (>= 3.28.1-0ubuntu2) but 3.18.1.2-1ubuntu1.16.04.2 is installed
Depends: gnome-session-common (= 3.28.1-0ubuntu2) but 3.18.1.2-1ubuntu1.16.04.2 is installed
Depends: xwayland but it is not installed
Recommends: fonts-cantarell but it is not installed
Recommends: adwaita-icon-theme-full
Recommends: gnome-themes-extra but it is not installed
gnome-settings-daemon : Depends: libgnome-desktop-3-17 (>= 3.17.92) but it is not installed
Depends: gsettings-desktop-schemas (>= 3.20) but 3.18.1-1ubuntu1 is installed
libc-dev-bin : Depends: libc6 (< 2.24) but 2.27-3ubuntu1 is installed
libc6-dbg : Depends: libc6 (= 2.23-0ubuntu10) but 2.27-3ubuntu1 is installed
libc6-dev : Depends: libc6 (= 2.23-0ubuntu10) but 2.27-3ubuntu1 is installed
libqt5quick5 : Depends: libqt5core5a (>= 5.9.0~beta) but 5.5.1+dfsg-16ubuntu7.5 is installed
Depends: libqt5gui5 (>= 5.9.0~beta) but 5.5.1+dfsg-16ubuntu7.5 is installed
Depends: libqt5qml5 (>= 5.9.5) but 5.5.1-2ubuntu6 is installed
Depends: qtbase-abi-5-9-5
Depends: qtdeclarative-abi-5-9-5
libunity-webapps0 : Depends: unity-webapps-service but it is not installable
libwayland-egl1-mesa : Depends: libegl1 but it is not installed
qml-module-qtquick-controls : Depends: libqt5qml5 (>= 5.9.5) but 5.5.1-2ubuntu6 is installed
Depends: libqt5core5a (>= 5.9.0~beta) but 5.5.1+dfsg-16ubuntu7.5 is installed
Depends: libqt5gui5 (>= 5.9.0~beta) but 5.5.1+dfsg-16ubuntu7.5 is installed
Depends: qtbase-abi-5-9-5
Depends: qtdeclarative-abi-5-9-5
qml-module-qtquick-dialogs : Depends: libqt5qml5 (>= 5.9.5) but 5.5.1-2ubuntu6 is installed
Depends: libqt5core5a (>= 5.9.0~beta) but 5.5.1+dfsg-16ubuntu7.5 is installed
Depends: libqt5gui5 (>= 5.9.0~beta) but 5.5.1+dfsg-16ubuntu7.5 is installed
Depends: qtbase-abi-5-9-5
Depends: qtdeclarative-abi-5-9-5
qml-module-qtquick-window2 : Depends: libqt5core5a (>= 5.9.0~beta) but 5.5.1+dfsg-16ubuntu7.5 is installed
Depends: qtdeclarative-abi-5-9-5
qml-module-qtwebkit : Depends: libqt5core5a (>= 5.9.0~beta) but 5.5.1+dfsg-16ubuntu7.5 is installed
Depends: qtdeclarative-abi-5-9-5
qml-module-ubuntu-test : Depends: qml-module-ubuntu-components but it is not installable
Depends: libubuntugestures5 but it is not installable
qml-module-ubuntu-ui-extras-browser : Depends: qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3) but it is not installable or
qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3) but it is not installable
qml-module-ubuntu-web : Depends: qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3) but it is not installable or
qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3) but it is not installable
unity-control-center : Depends: libgnome-desktop-3-17 (>= 3.27.90) but it is not installed
Recommends: system-config-printer but it is not installed
Recommends: gnome-control-center-faces but it is not installed
unity-webapps-qml : Depends: qtdeclarative5-ubuntu-ui-toolkit-plugin but it is not installable or
qtdeclarative5-ubuntu-ui-toolkit-plugin-gles but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
此外,GUI 有点奇怪。
发生了什么事?
答案1
这对我有用:
打开终端:( CTRLALTF1 输入您的用户和密码)然后
sudo apt install aptitude
下一步
sudo aptitude install ubuntu-desktop gdm3
您将获得有关如何修复不兼容性的选项,点击几次N,ENTER直到建议您删除一些旧软件包并安装更新的软件包。
然后给出Y一个ENTER解决方案,删除旧的不兼容包并安装新的包。
最后的
sudo reboot
以上对我有用。
答案2
根据错误消息 ,您似乎遇到了一些损坏的软件包E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
。要解决此问题,请查看文件/var/log/dist-upgrade/apt.log
。找到损坏的软件包并使用 将其删除sudo apt-get remove broken-package
。如果存在依赖性错误,请尝试重新安装软件包:sudo apt-get install --reinstall broken-package
。
现在尝试修复依赖错误:
sudo apt-get -f install
重新启动并再次尝试升级。
答案3
Ctrl使用++打开终端Alt并T输入:
update-manager -cd
从这里尝试更新。如果部分升级选项出现错误,请单击它。这将恢复 GUI。重新启动,然后再次运行该命令。应该没有错误,您可以通过 GUI 继续升级。