我通过 升级到了 Ubuntu 20.04 do-release-upgrade -d
。从终端看一切正常。但是,当我再次重新启动桌面时,我发现升级失败,图标丢失,某些应用程序(如 nautilus)无法启动等。
我跑了apt update
,也显示出来了357 packages can be upgraded.
,但是当我跑的时候apt upgrade -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
gir1.2-appindicator3-0.1 libice6:i386 libsm6:i386 libxt6:i386 python-notify
Use 'sudo apt autoremove' to remove them.
The following packages have been kept back:
appstream blender blender-data colord compizconfig-settings-manager cpp-7
cups cups-bsd cups-client cups-core-drivers cups-daemon cups-filters
cups-filters-core-drivers cups-ipp-utils cups-ppdc dash deja-dup dpkg
evolution-data-server fcitx-frontend-qt5 fcitx-modules fontforge
fontforge-common fwupd fwupd-signed fwupdate gcc-7 gcc-7-base gcc-7-multilib
gcc-8-base gcc-8-base:i386 gdal-data ghostscript ghostscript-x
gir1.2-freedesktop gir1.2-glib-2.0 gir1.2-gnomedesktop-3.0
gir1.2-gst-plugins-base-1.0 gir1.2-gtk-3.0 gir1.2-ibus-1.0 gir1.2-pango-1.0
gir1.2-polkit-1.0 gir1.2-rb-3.0 gir1.2-soup-2.4 gjs glib-networking
glib-networking-services gnome-calendar gnome-control-center
gnome-control-center-data gnome-initial-setup gnome-power-manager
gnome-session-bin gnome-session-common gnome-settings-daemon gnome-shell
gnome-shell-common gnome-shell-extension-appindicator
gnome-shell-extension-ubuntu-dock gnome-software gnome-software-common
gnome-software-plugin-snap gnome-startup-applications gnome-tweaks
gnuplot-data gnuplot-qt gparted gsettings-desktop-schemas gstreamer1.0-alsa
gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-libav
gstreamer1.0-plugins-base gstreamer1.0-plugins-base:i386
gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-pulseaudio
gstreamer1.0-vaapi gstreamer1.0-x gtk-update-icon-cache gvfs gvfs-backends
gvfs-bin gvfs-common gvfs-daemons gvfs-fuse gvfs-libs hplip hplip-data ibus
ibus-gtk ibus-gtk3 lib32asan4 lib32cilkrts5 lib32gcc-7-dev lib32mpx2
lib32ubsan0 libalgorithm-diff-xs-perl libappstream-glib8 libappstream4
libapt-pkg-perl libasan4 libcairo-gobject-perl libcairo-perl libcilkrts5
libclone-perl libcups2 libcups2:i386 libcupsimage2 libdazzle-1.0-0
libebackend-1.2-10 libegl-mesa0 libfcgi-perl libfcitx-qt5-1
libfile-fcntllock-perl libgail-3-0 libgail-common libgail-common:i386
libgail18 libgail18:i386 libgbm1 libgcab-1.0-0 libgcc-7-dev libgcc1
libgcc1:i386 libgfortran4 libgirepository-1.0-1 libgjs0g libgl1-mesa-dri
libgl1-mesa-dri:i386 libglapi-mesa libglapi-mesa:i386
libglib-object-introspection-perl libglib-perl libglib2.0-0
libglib2.0-0:i386 libglib2.0-bin libglib2.0-dev libglib2.0-dev-bin
libglibmm-2.4-1v5 libglx-mesa0 libglx-mesa0:i386 libgs9 libgs9-common
libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-base1.0-0
libgstreamer-plugins-base1.0-0:i386 libgstreamer-plugins-good1.0-0
libgtk-3-0 libgtk-3-bin libgtk2.0-0 libgtk2.0-0:i386 libgtk2.0-bin
libgtkmm-2.4-1v5 libgtkmm-3.0-1v5 libhpmud0 libhtml-parser-perl
libhttp-date-perl libhttp-message-perl libibus-1.0-5 libio-pty-perl
libio-socket-ssl-perl libjavascriptcoregtk-4.0-18 liblist-moreutils-perl
liblocale-gettext-perl libmpx2 libnautilus-extension1a libnet-dbus-perl
libnet-dns-perl libnet-libidn-perl libnet-ssleay-perl libosmesa6
libosmesa6:i386 libpango-1.0-0 libpango-1.0-0:i386 libpangocairo-1.0-0
libpangocairo-1.0-0:i386 libpangoft2-1.0-0 libpangoft2-1.0-0:i386
libpangomm-1.4-1v5 libpangoxft-1.0-0 libperlio-gzip-perl
libplexus-utils2-java libpolkit-agent-1-0 libpolkit-gobject-1-0
libpython-all-dev libpython3-dev libpython3-stdlib libqt5concurrent5
libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5opengl5
libqt5opengl5-dev libqt5printsupport5 libqt5qml5 libqt5quick5
libqt5quickcontrols2-5 libqt5quicktemplates2-5 libqt5sql5 libqt5sql5-sqlite
libqt5svg5 libqt5test5 libqt5widgets5 libqt5x11extras5 libqt5xml5
libreoffice-avmedia-backend-gstreamer libreoffice-base-core
libreoffice-common libreoffice-core libreoffice-gnome libreoffice-gtk3
libreoffice-l10n-en-za libreoffice-l10n-zh-cn libreoffice-math
libreoffice-style-breeze libreoffice-style-galaxy libreoffice-style-tango
librhythmbox-core10 libsane-common libsane-hpaio libsane1 libsane1:i386
libsmbclient libsocket6-perl libsoup-gnome2.4-1 libsoup2.4-1 libstdc++-7-dev
libsub-name-perl libtdb1 libtdb1:i386 libtext-charwidth-perl
libtext-iconv-perl libubsan0 libvlc-bin libvlc5 libwbclient0
libwebkit2gtk-4.0-37 libwine libwine:i386 libwww-perl libx32asan4
libx32cilkrts5 libx32gcc-7-dev libx32ubsan0 libxml-libxml-perl
libxml-parser-perl libyaml-libyaml-perl lintian lm-sensors mutter nautilus
nautilus-data octave octave-common orca pavucontrol pdfshuffler perl
perl-base playonlinux policykit-1 printer-driver-brlaser
printer-driver-gutenprint printer-driver-hpcups printer-driver-postscript-hp
python-all python-all-dev python-asn1crypto python-cairo python-cffi-backend
python-crypto python-cryptography python-dbus python-enum34 python-gobject-2
python-idna python-ipaddress python-keyring python-pip-whl
python-pkg-resources python-pypdf2 python-setuptools python-six python-tk
python-wxgtk3.0 python-wxversion python-xdg python3 python3-apt
python3-brlapi python3-cairo python3-cffi-backend python3-crypto
python3-cups python3-dbus python3-dev python3-distutils python3-evdev
python3-gdbm python3-gi python3-gi-cairo python3-lib2to3 python3-markupsafe
python3-minimal python3-netifaces python3-pil python3-pip python3-protobuf
python3-renderpm python3-reportlab python3-reportlab-accel
python3-setproctitle python3-simplejson python3-systemd python3-uno
python3-venv python3-yaml python3-zope.interface qml-module-qt-labs-settings
qml-module-qtgraphicaleffects qml-module-qtquick-controls2
qml-module-qtquick-layouts qml-module-qtquick-templates2
qml-module-qtquick-window2 qml-module-qtquick2 qt5-gtk-platformtheme
qt5-qmake qt5-qmake-bin qtbase5-dev qtbase5-dev-tools rhythmbox
rhythmbox-plugins samba-common samba-common-bin samba-libs sane-utils
texinfo ubuntu-session ubuntu-software unattended-upgrades ure vlc vlc-bin
vlc-data vlc-plugin-base vlc-plugin-qt vlc-plugin-skins2
vlc-plugin-video-output winbind wine-stable wine32:i386 wine64 winetricks
xdg-desktop-portal xdg-desktop-portal-gtk
0 upgraded, 0 newly installed, 0 to remove and 357 not upgraded.
基本上,系统不允许我升级。当我尝试手动安装其中一些时,它返回的最常见问题是
The following packages have unmet dependencies:
gsettings-desktop-schemas : Breaks: mutter (< 3.31.4) but 3.28.4-0ubuntu18.04.2 is to be installed
libreoffice-common : Breaks: libreoffice-core (< 1:6.4.2~rc1) but 1:6.0.7-0ubuntu0.18.04.10 is to be installed
Recommends: python3-uno (>= 4.4.0~beta2) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
因此,依赖关系肯定出了问题,但我还不知道如何修复。
这是我发现错误的更新日志
$ cat /var/log/dist-upgrade/apt.log|grep error
MarkInstall libgpg-error0:amd64 < 1.27-6 -> 1.37-1 @ii umU IPb > FU=0
new important dependency: libgpg-error-l10n:amd64
Installing libgpg-error-l10n as Recommends of libgpg-error0
MarkInstall libgpg-error-l10n:amd64 < none -> 1.37-1 @un uN > FU=0
答案1
这个问题可以通过使用 @guiverc 的建议来解决apt full-upgrade
。man apt
描述:
upgrade
用于安装系统中当前安装的所有软件包的可用升级,但现有软件包永远不会被删除。如果软件包的升级需要删除已安装的软件包,则不会执行此软件包的升级。
另外,请确保检查你的 repo(/etc/apt/source.list
)是否是最新的。
答案2
当您安装了第三方 deb 时,这种情况经常发生。如果您可以识别软件包并将其删除,则可以解决问题。
我以前也遇到过这种情况,通常可以使用“apt-get dist-upgrade”选项来解决这个问题。执行此操作时,请记住随后运行“apt-get autoremove”以摆脱孤立软件。
为了避免将来出现此类问题,请考虑对未包含在 ubuntu/debian 存储库中的任何软件使用“snaps”或“flatpacks”。