由于 python3 软件包损坏,无法将 Ubuntu 从 18.04 升级到 18.10

由于 python3 软件包损坏,无法将 Ubuntu 从 18.04 升级到 18.10

我跑了sudo apt-get upgrade,出现这个错误

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
99 not fully installed or removed.
Need to get 0 B/47.2 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: error processing package python3 (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of python3-cffi-backend:
 python3-cffi-backend depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-cffi-backend depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-cffi-backend depends on python3:any (>= 3.1~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-cffi-backend (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-olefile:
 python3-olefile depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-olefile (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          No apport report written because the error message indicates its a followup error from a previous failure.
                                                    No apport report written because MaxReports is reached already
                                  dpkg: dependency problems prevent configuration of python3-keyring:
 python3-keyring depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-keyring (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-brlapi:
 python3-brlapi depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-brlapi depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-brlapi depends on python3:any (>= 3.2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-brlapi (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-all-dev:
 python3-all-dev depends on python3 (= 3.6.7-1~18.04); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-all-dev (--configure):
 dependency problems - No apport report written because MaxReports is reached already
     No apport report written because MaxReports is reached already
                                                                   No apport report written because MaxReports is reached already
                                                 No apport report written because MaxReports is reached already
                               No apport report written because MaxReports is reached already
             No apport report written because MaxReports is reached already
                                                                           No apport report written because MaxReports is reached already
                                                         leaving unconfigured
dpkg: dependency problems prevent configuration of python3-mako:
 python3-mako depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-mako (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-crypto:
 python3-crypto depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-crypto depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-crypto depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-crypto (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-requests-unixsocket:
 python3-requests-unixsocket depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-requesNo apport report written because MaxReports is reached already
                           No apport report written because MaxReports is reached already
         No apport report written because MaxReports is reached already
                                                                       ts-unixsocket (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-magic:
 python3-magic depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-magic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-simplejson:
 python3-simplejson depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-simplejson depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-simplejson depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-simplejson (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-click:
 python3-click depends on python3:any (>= 3.3.2-2~); however:
No apport report written because MaxReports is reached already


dpkg: error processing package python3-click (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-idna:
 python3-idna depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-idna (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-xdg:
 python3-xdg depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-xdg (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-update-manager:
 python3-update-manager depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-update-manager (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of pythonNo apport report written because MaxReports is reached already
                                       3-keyrings.alt:
 python3-keyrings.alt depends on python3-crypto; however:
  Package python3-crypto is not configured yet.
 python3-keyrings.alt depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-keyrings.alt (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-six:
 python3-six depends on python3:any (>= 3.4~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-six (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-oauth:
 python3-oauth depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-oauth (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-colorama:
 python3-colorama depends on python3:any (>= 3.4~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-colorama (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-pymacaroons:
 python3-pymacaroons depends on python3-six (>= 1.8.0); however:
  Package python3-six is not configured yet.
 python3-pymacaroons depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-pymacaroons (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-dev:
 python3-dev depends on python3 (= 3.6.7-1~18.04); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-dev (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-certifi:
 python3-certifi depends on python3:any (>= 3.4~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-certifi (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-wadllib:
 python3-wadllib depends on python3:any (>= 3.4~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-wadllib (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-aptdaemon.gtk3widgets:
 python3-aptdaemon.gtk3widgets depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-aptdaemon.gtk3widgets (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-wheel:
 python3-wheel depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-wheel (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-zope.interface:
 python3-zope.interface depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-zope.interface depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-zope.interface depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-zope.interface (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-gi-cairo:
 python3-gi-cairo depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-gi-cairo depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-gi-cairo depends on python3:any (>= 3.3~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-gi-cairo (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                            dpkg: dependency problems prevent configuration of python3-pkg-resources:
 python3-pkg-resources depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-pkg-resources (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-gi:
 python3-gi depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-gi depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-gi depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-gi (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-gpg:
 python3-gpg depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-gpg depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-gpg depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-gpg (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-apport:
 python3-apport depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.
 python3-apport depends on python3-requests-unixsocket; however:
  Package python3-requests-unixsocket is not configured yet.

dpkg: error processing package python3-apport (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                            dpkg: dependency problems prevent configuration of python3-netifaces:
 python3-netifaces depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-netifaces depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-netifaces (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-markupsafe:
 python3-markupsafe depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-markupsafe depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-markupsafe depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-markupsafe (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-lazr.restfulclient:
 python3-lazr.restfulclient depends on python3-pkg-resources; however:
  Package python3-pkg-resources is not configured yet.
 python3-lazr.restfulclient depends on python3-simplejson; however:
  Package python3-simplejson is not configured yet.
 python3-lazr.restfulclient depends on python3-wadllib (>= 1.1.4); however:
  Package python3-wadllib is not configured yet.
 python3-lazr.restfulclient depends on python3-zope.interface; however:
  Package python3-zope.interface is not configured yet.
 python3-lazr.restfulclient depends on python3-oauth; however:
  Package python3-oauth is not configured yet.
 python3-lazr.restfulclient depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-lazr.restfulclient (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-defer:
 python3-defer depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-defer (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-problem-report:
 python3-problem-report depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-problem-report (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-asn1crypto:
 python3-asn1crypto depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-asn1crypto (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-blinker:
 python3-blinker depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-blinker (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-reportlab:
 python3-reportlab depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-reportlab (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-macaroonbakery:
 python3-macaroonbakery depends on python3-pymacaroons (>= 0.12.0); however:
  Package python3-pymacaroons is not configured yet.
 python3-macaroonbakery depends on python3-six (<< 2.0); however:
  Package python3-six is not configured yet.
 python3-macaroonbakery depends on python3-six (>= 1.11.0); however:
  Package python3-six is not configured yet.
 python3-macaroonbakery depends on python3:any (>= 3.5~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-macaroonbakery (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-docutils:
 python3-docutils depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-docutils (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-protobuf:
 No apport report written because MaxReports is reached already
                                                               No apport report written because MaxReports is reached already
                                             No apport report written because MaxReports is reached already
                           python3-protobuf depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-protobuf depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-protobuf depends on python3-pkg-resources; however:
  Package python3-pkg-resources is not configured yet.
 python3-protobuf depends on python3-six (>= 1.9); however:
  Package python3-six is not configured yet.
 python3-protobuf depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-protobuf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-debconf:
 python3-debconf depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-debconf (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-uno:
 python3-uno depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.
 python3-uno depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-uno depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-uno (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-pexpect:
 python3-pexpect depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-pexpect (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-chardet:
 python3-chardet depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.
 python3-chardet depends on python3-pkg-resources; however:
  Package python3-pkg-resources is not configured yet.

dpkg: error processing package python3-chardet (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of python3-aptdaemon:
 python3-aptdaemon depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.
 python3-aptdaemon depends on python3-defer (>= 1.0.6); however:
  Package python3-defer is not configured yet.
 python3-aptdaemon depends on python3-gi; however:
  Package python3-gi is not configured yet.
 python3-aptdaemon depends on python3-pkg-resources; however:
  Package python3-pkg-resources is not configured yet.

dpkg: error processing package python3-aptdaemon (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-systemd:
 python3-systemd depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-systemd depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-systemd depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing packNo apport report written because MaxReports is reached already
         No apport report written because MaxReports is reached already
                                                                       No apport report written because MaxReports is reached already
                                                     age python3-systemd (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-all:
 python3-all depends on python3 (= 3.6.7-1~18.04); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-all (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-jinja2:
 python3-jinja2 depends on python3-markupsafe; however:
  Package python3-markupsafe is not configured yet.
 python3-jinja2 depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-jinja2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-httplib2:
 python3-httplib2 depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                            dpkg: error processing package python3-httplib2 (--configure):
 dependency problems - leaving unconfigured
dpkg: too many errors, stopping
Errors were encountered while processing:
 python3
 python3-cffi-backend
 python3-olefile
 python3-keyring
 python3-brlapi
 python3-all-dev
 python3-mako
 python3-crypto
 python3-requests-unixsocket
 python3-magic
 python3-simplejson
 python3-click
 python3-idna
 python3-xdg
 python3-update-manager
 python3-keyrings.alt
 python3-six
 python3-oauth
 python3-colorama
 python3-pymacaroons
 python3-dev
 python3-certifi
 python3-wadllib
 python3-aptdaemon.gtk3widgets
 python3-wheel
 python3-zope.interface
 python3-gi-cairo
 python3-pkg-resources
 python3-gi
 python3-gpg
 python3-apport
 python3-netifaces
 python3-markupsafe
 python3-lazr.restfulclient
 python3-defer
 python3-problem-report
 python3-asn1crypto
 python3-blinker
 python3-reportlab
 python3-macaroonbakery
 python3-docutils
 python3-protobuf
 python3-debconf
 python3-uno
 python3-pexpect
 python3-chardet
 python3-aptdaemon
 python3-systemd
 python3-all
 python3-jinja2
 python3-httplib2
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

我试过了sudo apt-get install --reinstall python3-minimal,我也试过了,sudo apt-get -f install但仍然得到同样的错误

当我运行时python3它似乎工作正常,但是当我尝试升级时我收到上述错误。

答案1

您的输出包含以下行:

 dpkg: error processing package python3 (--configure):
  package is in a very bad inconsistent state; you should
  reinstall it before attempting configuration

所有其他失败都包括以下行:

 Package python3 is not configured yet.

有一个共同的主题:python3包裹。

下一步是重新安装python3(不是python3-minimal)包。

相关内容