升级至 Ubuntu 22.04(从 21.10)失败,导致系统处于崩溃状态

升级至 Ubuntu 22.04(从 21.10)失败,导致系统处于崩溃状态

我尝试从 21.10 升级到 Ubuntu 22.04。出了点问题,现在我的软件包配置出错了。以下是我所做事情的概述:

  1. 为了能够更新,我必须按照说明进行操作这里,因为 21.10 是 EOL。这似乎工作正常,我能够在进行系统升级之前更新所有 21.10 软件包。
  2. 我首先尝试通过 GUI 软件更新程序进行更新。它停止在“获取新软件包”步骤。因此我中止了,它顺利完成了中止。源/etc/apt/source.list已正确恢复为 impish/21.10 源。
  3. 然后我尝试通过控制台进行更新(使用sudo do-release-upgrade),以通过其输出获取更多信息。这一直运行到最后,但我最后得到了这个输出(如果需要,我可以提供更新过程的完整输出):
Processing triggers for gconf2 (3.2.6-7ubuntu2) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libgdk-pixbuf-2.0-0:amd64 (2.42.6+dfsg-1build2) ...
Setting up gir1.2-gdm-1.0:amd64 (42.0-1ubuntu7) ...
Errors were encountered while processing:
 libinput10:amd64
 libinput-bin
 gir1.2-mutter-10:amd64
 gnome-shell
 libgtk-4-1:amd64
 gir1.2-gtk-4.0:amd64
 gnome-shell-extensions
 gir1.2-adw-1:amd64
 libadwaita-1-0:amd64

Upgrade complete 

The upgrade has completed but there were errors during the upgrade 
process. 

To continue please press [ENTER]

运行时,我得到了一个包含 2500 多个需要升级的软件包的列表sudo apt list --upgradable,比如 xserver(如果需要,我可以提供完整列表),它告诉我有些事情出了问题:

xinput/jammy 1.6.3-1build2 amd64 [upgradable from: 1.6.3-1build1]
xorg/jammy 1:7.7+23ubuntu2 amd64 [upgradable from: 1:7.7+22ubuntu2]
xserver-xephyr/jammy-updates,jammy-security 2:21.1.3-2ubuntu2.1 amd64 [upgradable from: 2:1.20.13-1ubuntu1.2]
xserver-xorg-core/jammy-updates,jammy-security 2:21.1.3-2ubuntu2.1 amd64 [upgradable from: 2:1.20.13-1ubuntu1.2]
xserver-xorg-input-all/jammy 1:7.7+23ubuntu2 amd64 [upgradable from: 1:7.7+22ubuntu2]
xserver-xorg-input-libinput/jammy 1.2.1-1 amd64 [upgradable from: 1.1.0-1]
xserver-xorg-input-wacom/jammy 1:1.0.0-3ubuntu1 amd64 [upgradable from: 1:0.39.0-0ubuntu2]
xserver-xorg-video-all/jammy 1:7.7+23ubuntu2 amd64 [upgradable from: 1:7.7+22ubuntu2]
xserver-xorg-video-amdgpu/jammy 22.0.0-1build1 amd64 [upgradable from: 21.0.0-1]
xserver-xorg-video-ati/jammy-updates 1:19.1.0-2ubuntu1 amd64 [upgradable from: 1:19.1.0-2build1]
xserver-xorg-video-fbdev/jammy 1:0.5.0-2build1 amd64 [upgradable from: 1:0.5.0-1ubuntu3]
xserver-xorg-video-intel/jammy 2:2.99.917+git20210115-1 amd64 [upgradable from: 2:2.99.917+git20200714-1ubuntu2]
xserver-xorg-video-nouveau/jammy 1:1.0.17-2build1 amd64 [upgradable from: 1:1.0.17-1build1]
xserver-xorg-video-nvidia-470-server/jammy-updates,jammy-security 470.129.06-0ubuntu0.22.04.1 amd64 [upgradable from: 470.129.06-0ubuntu0.21.10.1]
xserver-xorg-video-qxl/jammy 0.1.5+git20200331-3 amd64 [upgradable from: 0.1.5+git20200331-1build1]
xserver-xorg-video-radeon/jammy-updates 1:19.1.0-2ubuntu1 amd64 [upgradable from: 1:19.1.0-2build1]
xserver-xorg-video-vesa/jammy 1:2.5.0-1build4 amd64 [upgradable from: 1:2.5.0-1build2]
xserver-xorg-video-vmware/jammy 1:13.3.0-3build1 amd64 [upgradable from: 1:13.3.0-3]
xserver-xorg/jammy 1:7.7+23ubuntu2 amd64 [upgradable from: 1:7.7+22ubuntu2]

版本仍显示为 21.10:

cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=21.10
DISTRIB_CODENAME=impish
DISTRIB_DESCRIPTION="Ubuntu 21.10"

现在我被困在部分升级的系统里,不知道该怎么做。我在网上找不到任何有用的东西,我不想因为“只是尝试一些东西”而让事情变得更糟(而且我“害怕”重新启动……)。话虽如此,我做过请尝试以下方法来修复此问题:

  1. sudo dpkg --configure -a输出以下内容:
sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of libinput10:amd64:
 libinput10:amd64 depends on libwacom9 (>= 2.0.0); however:
  Package libwacom9 is not installed.

dpkg: error processing package libinput10:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libinput-bin:
 libinput-bin depends on libwacom9 (>= 2.0.0); however:
  Package libwacom9 is not installed.

dpkg: error processing package libinput-bin (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gir1.2-mutter-10:amd64:
 gir1.2-mutter-10:amd64 depends on libmutter-10-0 (= 42.2-0ubuntu1); however:
  Package libmutter-10-0 is not installed.

dpkg: error processing package gir1.2-mutter-10:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-shell:
 gnome-shell depends on gir1.2-mutter-10 (>= 42.0); however:
  Package gir1.2-mutter-10:amd64 is not configured yet.
 gnome-shell depends on gnome-shell-common (= 42.2-0ubuntu0.2); however:
  Version of gnome-shell-common on system is 40.5-1ubuntu2.
 gnome-shell depends on libgjs0g (>= 1.71.1); however:
  Version of libgjs0g:amd64 on system is 1.68.4-1.
 gnome-shell depends on libmutter-10-0 (>= 42.0); however:
  Package libmutter-10-0 is not installed.

dpkg: error processing package gnome-shell (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgtk-4-1:amd64:
 libgtk-4-1:amd64 depends on libglib2.0-0 (>= 2.70.0); however:
  Version of libglib2.0-0:amd64 on system is 2.68.4-1ubuntu1.

dpkg: error processing package libgtk-4-1:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gir1.2-gtk-4.0:amd64:
 gir1.2-gtk-4.0:amd64 depends on libgtk-4-1 (>= 4.6.0); however:
  Package libgtk-4-1:amd64 is not configured yet.

dpkg: error processing package gir1.2-gtk-4.0:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-shell-extensions:
 gnome-shell-extensions depends on gir1.2-gtk-4.0; however:
  Package gir1.2-gtk-4.0:amd64 is not configured yet.
 gnome-shell-extensions depends on gnome-shell (<< 43~); however:
  Package gnome-shell is not configured yet.
 gnome-shell-extensions depends on gnome-shell (>= 42~); however:
  Package gnome-shell is not configured yet.

dpkg: error processing package gnome-shell-extensions (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gir1.2-adw-1:amd64:
 gir1.2-adw-1:amd64 depends on gir1.2-gtk-4.0 (>= 4.5.0); however:
  Package gir1.2-gtk-4.0:amd64 is not configured yet.

dpkg: error processing package gir1.2-adw-1:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libadwaita-1-0:amd64:
 libadwaita-1-0:amd64 depends on libgtk-4-1 (>= 4.5.0); however:
  Package libgtk-4-1:amd64 is not configured yet.

dpkg: error processing package libadwaita-1-0:amd64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libinput10:amd64
 libinput-bin
 gir1.2-mutter-10:amd64
 gnome-shell
 libgtk-4-1:amd64
 gir1.2-gtk-4.0:amd64
 gnome-shell-extensions
 gir1.2-adw-1:amd64
 libadwaita-1-0:amd64
  1. 尝试运行sudo apt --fix-broken install,出现与第 1 点中所示的相同错误。

  2. 我尝试手动安装缺少的依赖项(按照说明这里)。这对以下情况有效:

apt-get download libwacom-common
apt-get download libwacom9
sudo dpkg -i libwacom-common_2.2.0-1_all.deb
sudo dpkg -i  libwacom9_2.2.0-1_amd64.deb

但我在尝试这样做时遇到了困难:

apt-get download libmutter-10-0
sudo dpkg -i libmutter-10-0_42.2-0ubuntu1_amd64.deb

输出:

dpkg: regarding libmutter-10-0_42.2-0ubuntu1_amd64.deb containing libmutter-10-0:amd64:
 libmutter-10-0 breaks libgtk-3-0 (<< 3.24.33-1ubuntu2~)
  libgtk-3-0:amd64 (version 3.24.30-1ubuntu1.1) is present and installed.

dpkg: error processing archive libmutter-10-0_42.2-0ubuntu1_amd64.deb (--install):
 installing libmutter-10-0:amd64 would break libgtk-3-0:amd64, and
 deconfiguration is not permitted (--auto-deconfigure might help)
Errors were encountered while processing:
 libmutter-10-0_42.2-0ubuntu1_amd64.deb
  1. 当我启动 GUI 软件更新程序时,我得到以下窗口,我有点不愿意点击‘部分升级’,因为我不想盲目地弄乱我的系统:

在此处输入图片描述


更新 1: 似乎安装两个缺失的软件包

apt-get download libwacom-common
apt-get download libwacom9

确实做了一些事情。sudo apt --fix-broken install现在运行会输出以下内容(之前它还会给出错误依赖关系问题错误,如上文第 1 点所示)。我应该尝试这样做吗?还是冒着让系统更加混乱的风险?!:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  gir1.2-appstreamglib-1.0 gir1.2-gcab-1.0 gir1.2-gnomebluetooth-1.0 gir1.2-gom-1.0 gir1.2-gtk-2.0 ldap-utils libblkid-dev libcmis-0.5-5v5 libdatrie-dev libdbus-1-dev libdbus-glib-1-dev-bin libdjvulibre-dev
  libdw-dev libegl1-mesa-dev libelf-dev libepoxy-dev libextutils-pkgconfig-perl libfontconfig-dev libfontconfig1-dev libfribidi-dev libglib2.0-dev-bin libgraphite2-dev libharfbuzz-gobject0 libilmbase-dev
  libipa-hbac0 liblcms2-dev liblqr-1-0-dev libmagick++-6-headers libmagickcore-6-arch-config libmagickcore-6-headers libmagickwand-6-headers libmozjs-78-0 libneon27-gnutls libopenexr-dev libopenjp2-7-dev
  liborc-0.4-dev liborc-0.4-dev-bin liborcus-0.16-0 liborcus-parser-0.16-0 libpango-perl libpixman-1-dev libpod-parser-perl libpsl-dev libpython3.9-dev libreoffice-ogltrans libthai-dev libvala-0.52-0
  libvalacodegen-0.52-0 libwayland-bin libwayland-dev libwmf-dev libx11-xcb-dev libxcb-render0-dev libxcb-shm0-dev libxcomposite-dev libxcursor-dev libxcvt0 libxdamage-dev libxft-dev libxinerama-dev
  libxkbcommon-dev libxml2-dev libxrandr-dev libxrender-dev libxtst-dev libyaml-dev pango1.0-tools python3-dnspython python3-ecdsa python3-pycryptodome python3-tdb python3.9-dev sssd-ad-common uuid-dev
  valac-0.52-vapi valac-bin wayland-protocols x11proto-randr-dev x11proto-record-dev x11proto-xinerama-dev
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  duplicity gdm3 gir1.2-dbusmenu-glib-0.4 gir1.2-freedesktop gir1.2-glib-2.0 gir1.2-rb-3.0 gir1.2-soup-2.4 gjs gnome-control-center gnome-settings-daemon gnome-shell-common gnome-shell-extension-appindicator
  gnome-shell-extension-prefs gnome-shell-extension-ubuntu-dock gobject-introspection libabsl20210324 libatk-bridge2.0-0 libatk-bridge2.0-0:i386 libatk1.0-0 libatk1.0-0:i386 libatk1.0-data libatspi2.0-0
  libatspi2.0-0:i386 libb-hooks-op-check-perl libbrlapi0.8 libcairo-gobject2 libcairo-gobject2:i386 libcairo-perl libcairo-script-interpreter2 libcairo2 libcairo2:i386 libclass-c3-xs-perl libclone-perl
  libcpanel-json-xs-perl libdbusmenu-glib4 libdevel-caller-perl libdevel-lexalias-perl libfile-fcntllock-perl libgail-3-0 libgdk-pixbuf-2.0-0 libgdk-pixbuf-2.0-0:i386 libgdk-pixbuf2.0-common
  libgirepository-1.0-1 libgjs0g libglib-object-introspection-perl libglib-perl libglib2.0-0 libglib2.0-0:i386 libglib2.0-bin libglib2.0-dev-bin libgpgme11 libgpgmepp6 libgtk-3-0 libgtk-3-common libgtk2.0-0
  libgtk2.0-0:i386 libgtk2.0-bin libharfbuzz0b libharfbuzz0b:i386 libicu70 libjs-sphinxdoc libjsoncpp25 libldb2 liblist-moreutils-xs-perl liblocale-gettext-perl libmount1 libmount1:i386 libmozjs-91-0
  libmutter-10-0 liborcus-0.17-0 liborcus-parser-0.17-0 libpoppler118 libpython3-dev libpython3-stdlib libpython3.10 libpython3.10-dev libpython3.10-stdlib libreoffice-base-core libreoffice-calc
  libreoffice-common libreoffice-core libreoffice-draw libreoffice-gnome libreoffice-gtk3 libreoffice-impress libreoffice-math libreoffice-writer librhythmbox-core10 libselinux1 libselinux1:i386
  libsoup-gnome2.4-1 libsoup2.4-1 libsoup2.4-common libtalloc2 libtdb1 libtdb1:i386 libuno-cppuhelpergcc3-3 libuno-sal3 libwacom-bin libxmlsec1 libxmlsec1-nss mutter onboard onboard-common onboard-data python3
  python3-apt python3-bcrypt python3-brlapi python3-cairo python3-cffi-backend python3-compizconfig python3-cups python3-dbus python3-dev python3-distutils python3-gdbm python3-gi python3-gi-cairo python3-gpg
  python3-ldb python3-lib2to3 python3-lxml python3-markupsafe python3-minimal python3-nacl python3-netifaces python3-numpy python3-openshot python3-protobuf python3-py python3-pycryptodome python3-pyqt5.sip
  python3-pyxattr python3-simplejson python3-sss python3-systemd python3-talloc python3-tdb python3-uno python3-yaml python3-zmq python3.10 python3.10-dev rhythmbox rhythmbox-data rhythmbox-plugins
  unity-control-center unity-settings-daemon uno-libs-private ure ure-java yaru-theme-gnome-shell
Suggested packages:
  python3-boto ncftp lftp tahoe-lafs python3-swiftclient par2 libpam-pkcs11 gnome-software | gnome-packagekit gnome-user-share realmd usbguard libfont-freetype-perl gvfs:i386 libreoffice-base
  libreoffice-evolution fonts-crosextra-caladea fonts-crosextra-carlito libreoffice-java-common python3-doc python3-tk python3-venv python3-apt-dbg python-apt-doc python-dbus-doc python3-gdbm-dbg
  python-lxml-doc python-nacl-doc python-numpy-doc python3-pytest subversion python3-pyxattr-dbg python-pyxattr-doc python3.10-venv python3.10-doc gnome-codec-install rhythmbox-plugin-cdrecorder
Recommended packages:
  at-spi2-core:i386 libgail-common libgail-common:i386 sssd ubuntu-system-service systemd-services
The following packages will be REMOVED:
  gir1.2-mutter-8 libappindicator3-dev libappstream-glib-dev libatk-bridge2.0-dev libatk1.0-dev libatspi2.0-dev libcairo2-dev libdbus-glib-1-dev libdbusmenu-glib-dev libgail-common libgail-common:i386
  libgail18 libgail18:i386 libgcab-dev libgdk-pixbuf-2.0-dev libgdk-pixbuf-xlib-2.0-dev libgdk-pixbuf2.0-dev libgirepository1.0-dev libglib2.0-dev libgom-1.0-dev libgstreamer-plugins-base1.0-dev
  libgstreamer1.0-dev libgtk-3-dev libgtk2-perl libgtk2.0-dev libharfbuzz-dev libmagick++-6.q16-dev libmagick++-dev libmagickcore-6.q16-dev libmagickwand-6.q16-dev libmount-dev libmutter-8-0 libpango1.0-dev
  libpeas-dev librsvg2-dev libselinux1-dev libsoup2.4-dev libwacom2 libzbar-dev python3-samba python3-venv python3.9-venv samba-common-bin samba-dsdb-modules smbclient sssd sssd-ad sssd-ipa sssd-ldap valac
The following NEW packages will be installed:
  libabsl20210324 libicu70 libjsoncpp25 libmozjs-91-0 libmutter-10-0 liborcus-0.17-0 liborcus-parser-0.17-0 libpoppler118 libpython3.10 libpython3.10-dev libpython3.10-stdlib libsoup2.4-common python3-py
  python3.10 python3.10-dev
The following packages will be upgraded:
  duplicity gdm3 gir1.2-dbusmenu-glib-0.4 gir1.2-freedesktop gir1.2-glib-2.0 gir1.2-rb-3.0 gir1.2-soup-2.4 gjs gnome-control-center gnome-settings-daemon gnome-shell-common gnome-shell-extension-appindicator
  gnome-shell-extension-prefs gnome-shell-extension-ubuntu-dock gobject-introspection libatk-bridge2.0-0 libatk-bridge2.0-0:i386 libatk1.0-0 libatk1.0-0:i386 libatk1.0-data libatspi2.0-0 libatspi2.0-0:i386
  libb-hooks-op-check-perl libbrlapi0.8 libcairo-gobject2 libcairo-gobject2:i386 libcairo-perl libcairo-script-interpreter2 libcairo2 libcairo2:i386 libclass-c3-xs-perl libclone-perl libcpanel-json-xs-perl
  libdbusmenu-glib4 libdevel-caller-perl libdevel-lexalias-perl libfile-fcntllock-perl libgail-3-0 libgdk-pixbuf-2.0-0 libgdk-pixbuf-2.0-0:i386 libgdk-pixbuf2.0-common libgirepository-1.0-1 libgjs0g
  libglib-object-introspection-perl libglib-perl libglib2.0-0 libglib2.0-0:i386 libglib2.0-bin libglib2.0-dev-bin libgpgme11 libgpgmepp6 libgtk-3-0 libgtk-3-common libgtk2.0-0 libgtk2.0-0:i386 libgtk2.0-bin
  libharfbuzz0b libharfbuzz0b:i386 libjs-sphinxdoc libldb2 liblist-moreutils-xs-perl liblocale-gettext-perl libmount1 libmount1:i386 libpython3-dev libpython3-stdlib libreoffice-base-core libreoffice-calc
  libreoffice-common libreoffice-core libreoffice-draw libreoffice-gnome libreoffice-gtk3 libreoffice-impress libreoffice-math libreoffice-writer librhythmbox-core10 libselinux1 libselinux1:i386
  libsoup-gnome2.4-1 libsoup2.4-1 libtalloc2 libtdb1 libtdb1:i386 libuno-cppuhelpergcc3-3 libuno-sal3 libwacom-bin libxmlsec1 libxmlsec1-nss mutter onboard onboard-common onboard-data python3 python3-apt
  python3-bcrypt python3-brlapi python3-cairo python3-cffi-backend python3-compizconfig python3-cups python3-dbus python3-dev python3-distutils python3-gdbm python3-gi python3-gi-cairo python3-gpg python3-ldb
  python3-lib2to3 python3-lxml python3-markupsafe python3-minimal python3-nacl python3-netifaces python3-numpy python3-openshot python3-protobuf python3-pycryptodome python3-pyqt5.sip python3-pyxattr
  python3-simplejson python3-sss python3-systemd python3-talloc python3-tdb python3-uno python3-yaml python3-zmq rhythmbox rhythmbox-data rhythmbox-plugins unity-control-center unity-settings-daemon
  uno-libs-private ure ure-java yaru-theme-gnome-shell
138 upgraded, 15 newly installed, 50 to remove and 2362 not upgraded.
7 not fully installed or removed.
Need to get 156 MB of archives.
After this operation, 45,0 MB disk space will be freed.
Do you want to continue? [Y/n]

相关内容