Ubuntu 从 18.04 升级到 20.04 导致 Python 崩溃

Ubuntu 从 18.04 升级到 20.04 导致 Python 崩溃

我今天将服务器从 18.04 LTS 更新到了 20.04 LTS。不幸的是,我面临两个问题:

1. apt-get update && upgrade 不起作用。

   机器返回一长串“Depends”错误。请参见下文:

The following packages have unmet dependencies:
     debconf-i18n : Depends: debconf (= 1.5.73) but 1.5.66ubuntu1 is installed
     dirmngr : Depends: init-system-helpers (>= 1.52) but 1.51 is installed
     gir1.2-gtk-3.0 : Depends: gir1.2-gdkpixbuf-2.0 (>= 2.40.0) but 2.36.11-2 is installed
                      Depends: gir1.2-pango-1.0 (>= 1.41.0) but 1.40.14-1ubuntu0.1 is installed
                      Depends: libgtk-3-0 (>= 3.24.7) but 3.22.30-1ubuntu4 is installed
     gnupg : Depends: gpgv (>= 2.2.19-3ubuntu2.2)
     gpg-agent : Depends: init-system-helpers (>= 1.52) but 1.51 is installed
     mailutils : Depends: guile-2.2-libs but it is not installed
                 Depends: libmailutils6 but it is not installed
                 Depends: libncurses6 (>= 6) but it is not installed
     python3 : PreDepends: python3-minimal (= 3.6.7-1~18.04) but 3.8.2-0ubuntu2 is installed
               Depends: libpython3-stdlib (= 3.6.7-1~18.04) but 3.8.2-0ubuntu2 is installed
     python3-apt : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-cairo : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-cffi-backend : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-cheetah : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-crypto : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-dbus : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-dev : Depends: python3 (= 3.8.2-0ubuntu2) but 3.6.7-1~18.04 is installed
                   Depends: libpython3-dev (= 3.8.2-0ubuntu2) but 3.6.7-1~18.04 is installed
                   Depends: python3.8-dev (>= 3.8.2-1~) but it is not installed
     python3-distutils : Depends: python3:any (>= 3.8.2-0~)
     python3-geoip : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-gi : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
                  Depends: libgirepository-1.0-1 (>= 1.62.0-4~) but 1.56.1-1 is installed
     python3-gi-cairo : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-icu : Depends: libicu66 (>= 66.1~rc-1~) but it is not installed
                   Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-lib2to3 : Depends: python3:any (>= 3.8.2-0~)
     python3-libtorrent : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
                          Depends: libtorrent-rasterbar10 (= 1.2.16~daily10769+e0dd73971-202206291010~ubuntu20.04.1) but 1.2.16~daily10769+e0dd73971-202206291010~ubuntu18.04.1 is installed
     python3-markupsafe : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-netifaces : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-newt : Depends: libnewt0.52 (= 0.52.21-4ubuntu2) but 0.52.20-1ubuntu1 is installed
                    Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-pam : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-pil : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
                   Depends: libfreetype6 (>= 2.9.1) but 2.8.1-2ubuntu2.2 is installed
                   Depends: libimagequant0 (>= 2.11.10) but it is not installed
                   Depends: libwebpmux3 (>= 0.6.1-2ubuntu0.20.04.1) but 0.6.1-2ubuntu0.18.04.1 is installed
     python3-rencode : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-sabyenc : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-setproctitle : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-simplejson : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-systemd : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-twisted-bin : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-ujson : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-yaml : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-zope.hookable : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
     python3-zope.interface : Depends: python3 (>= 3.8~) but 3.6.7-1~18.04 is installed
    E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

2. Python 无法运行。

到目前为止,我已经尝试了以下方法:

1 apt --fix-broken install..

   这些错误包括以下内容:

`Exception: python3.8 -c 'import imp; print(imp.get_tag())' failed with status code 139
dpkg: error processing package python3-minimal (--configure):
 installed python3-minimal package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 python3-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)`

2.尝试卸载并修复 Python。

   我得到的只是上述依赖项列表。我还确认 Python 3.6.9 已使用 python --version 安装。我无法更新它。

3. 我已经使用过 aptitude 但是它无法修复任何 Python 包。

我将非常感激任何帮助或建议。

相关内容