python3-minimal总线错误Ubuntu 18.04

python3-minimal总线错误Ubuntu 18.04

我无法使用 apt 执行任何升级,因为 Ubuntu 18.04 上的 python3 存在一些依赖问题。

$: sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 python3 : PreDepends: python3-minimal (= 3.6.5-3ubuntu1) but 3.6.7-1~18.04 is installed
 python3-dev : Depends: python3 (= 3.6.7-1~18.04) but 3.6.5-3ubuntu1 is installed
               Depends: libpython3-dev (= 3.6.7-1~18.04) but 3.6.5-3ubuntu1 is installed
 python3-distutils : Depends: python3 (>= 3.6.6-1~) but 3.6.5-3ubuntu1 is installed
 python3-lib2to3 : Depends: python3 (>= 3.6.6-1~) but 3.6.5-3ubuntu1 is installed
 python3-tk : Depends: python3 (>= 3.6.6-1~) but 3.6.5-3ubuntu1 is installed
 python3-venv : Depends: python3 (= 3.6.7-1~18.04) but 3.6.5-3ubuntu1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

我尝试过apt-get install -f,但是问题并没有解决。

$: sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libkeybinder-3.0-0 libregexp-common-perl pastebinit
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libpython3-dev libpython3-stdlib python3
Suggested packages:
  python3-doc
The following packages will be upgraded:
  libpython3-dev libpython3-stdlib python3
3 upgraded, 0 newly installed, 0 to remove and 42 not upgraded.
6 not fully installed or removed.
Need to get 0 B/61.8 kB of archives.
After this operation, 116 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up python3-minimal (3.6.7-1~18.04) ...
Bus error (core dumped)
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 290, in <module>
    main()
  File "/usr/bin/py3compile", line 251, in main
    pkg_files = tuple(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of python3-minimal
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) 

我也尝试过sudo apt remove python3但是也没有用。

$: sudo apt remove python3
[sudo] password for aman: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 apparmor : Depends: python3:any
 apport : Depends: python3 but it is not going to be installed
 apport-gtk : Depends: python3 but it is not going to be installed
 aptdaemon : Depends: python3:any (>= 3.2~)
 apturl : Depends: python3:any (>= 3.3.2-2~)
 apturl-common : Depends: python3:any (>= 3.3.2-2~)
 chrome-gnome-shell : Depends: python3 but it is not going to be installed
 dh-python : Depends: python3:any (>= 3.3.2-2~)
 foomatic-db-compressed-ppds : Depends: python3 but it is not going to be installed
 gedit : Depends: python3:any (>= 3.3.2-2~)
 gedit-common : Depends: python3:any (>= 3.3.2-2~)
 gir1.2-ibus-1.0 : Depends: python3:any (>= 3.3.2-2~)
 gnome-menus : Depends: python3:any (>= 3.1~)
 gnome-shell : Depends: python3 but it is not going to be installed
 gnome-terminal : Depends: python3 but it is not going to be installed
 gnome-tweaks : Depends: python3:any (>= 3.3.2-2~)
 hplip : Depends: python3 (< 3.7) but it is not going to be installed
         Depends: python3 (>= 3.6~) but it is not going to be installed
 hplip-data : Depends: python3:any (>= 3.3.2-2~)
 ibus : Depends: python3:any (>= 3.3.2-2~)
 ibus-table : Depends: python3:any (>= 3.3.2-2~)
 language-selector-common : Depends: python3:any (>= 3.3.2-2~)
 language-selector-gnome : Depends: python3:any (>= 3.3.2-2~)
 lsb-release : Depends: python3:any (>= 3.4~)
 netplan.io : Depends: python3 but it is not going to be installed
 networkd-dispatcher : Depends: python3:any
 openprinting-ppds : Depends: python3 but it is not going to be installed
 orca : Depends: python3:any (>= 3.3.2-2~)
 pastebinit : Depends: python3 but it is not going to be installed
 printer-driver-foo2zjs-common : Depends: python3 but it is not going to be installed
 printer-driver-m2300w : Depends: python3 but it is not going to be installed
 printer-driver-postscript-hp : Depends: python3 but it is not going to be installed
 printer-driver-ptouch : Depends: python3 but it is not going to be installed
 printer-driver-pxljr : Depends: python3 but it is not going to be installed
 python3-apport : Depends: python3:any (>= 3.3.2-2~)
 python3-apt : Depends: python3 (< 3.7) but it is not going to be installed
               Depends: python3 (>= 3.6~) but it is not going to be installed
               Depends: python3:any (>= 3.3.2-2~)
 python3-aptdaemon : Depends: python3:any (>= 3.3.2-2~)
 python3-aptdaemon.gtk3widgets : Depends: python3:any (>= 3.3.2-2~)
 python3-asn1crypto : Depends: python3:any (>= 3.3.2-2~)
 python3-brlapi : Depends: python3 (< 3.7) but it is not going to be installed
                  Depends: python3 (>= 3.6~) but it is not going to be installed
                  Depends: python3:any (>= 3.2~)
 python3-cairo : Depends: python3 (< 3.7) but it is not going to be installed
                 Depends: python3 (>= 3.6~) but it is not going to be installed
                 Depends: python3:any (>= 3.3.2-2~)
 python3-certifi : Depends: python3:any (>= 3.4~)
 python3-cffi-backend : Depends: python3 (< 3.7) but it is not going to be installed
                        Depends: python3 (>= 3.6~) but it is not going to be installed
                        Depends: python3:any (>= 3.1~)
 python3-chardet : Depends: python3:any (>= 3.3.2-2~)
 python3-commandnotfound : Depends: python3:any (>= 3.3.2-2~)
 python3-crypto : Depends: python3 (< 3.7) but it is not going to be installed
                  Depends: python3 (>= 3.6~) but it is not going to be installed
                  Depends: python3:any (>= 3.3.2-2~)
 python3-cryptography : Depends: python3 (>= 3~) but it is not going to be installed
                        Depends: python3:any (>= 3.4~)
 python3-cups : Depends: python3 (< 3.7) but it is not going to be installed
                Depends: python3 (>= 3.6~) but it is not going to be installed
 python3-cupshelpers : Depends: python3:any (>= 3.3.2-2~)
 python3-dbus : Depends: python3 (< 3.7) but it is not going to be installed
                Depends: python3 (>= 3.6~) but it is not going to be installed
                Depends: python3:any (>= 3.4~)
 python3-debconf : Depends: python3:any (>= 3.3.2-2~)
 python3-debian : Depends: python3:any (>= 3.3.2-2~)
 python3-defer : Depends: python3:any (>= 3.3.2-2~)
 python3-dev : Depends: python3 (= 3.6.7-1~18.04) but it is not going to be installed
               Depends: libpython3-dev (= 3.6.7-1~18.04) but 3.6.5-3ubuntu1 is to be installed
 python3-distro-info : Depends: python3:any (>= 3.3.2-2~)
 python3-distupgrade : Depends: python3:any (>= 3.3.2-2~)
 python3-distutils : Depends: python3 (>= 3.6.6-1~) but it is not going to be installed
                     Depends: python3 (< 3.8) but it is not going to be installed
 python3-gdbm : Depends: python3 (>= 3.6.4-1~) but it is not going to be installed
                Depends: python3 (< 3.8) but it is not going to be installed
 python3-gi : Depends: python3 (< 3.7) but it is not going to be installed
              Depends: python3 (>= 3.6~) but it is not going to be installed
              Depends: python3:any (>= 3.3.2-2~)
 python3-gi-cairo : Depends: python3 (< 3.7) but it is not going to be installed
                    Depends: python3 (>= 3.6~) but it is not going to be installed
                    Depends: python3:any (>= 3.3~)
 python3-httplib2 : Depends: python3:any (>= 3.3.2-2~)
 python3-idna : Depends: python3:any (>= 3.3.2-2~)
 python3-keyring : Depends: python3:any (>= 3.3.2-2~)
 python3-keyrings.alt : Depends: python3:any (>= 3.3.2-2~)
 python3-launchpadlib : Depends: python3:any (>= 3.3.2-2~)
 python3-lazr.restfulclient : Depends: python3:any (>= 3.3.2-2~)
 python3-lazr.uri : Depends: python3:any (>= 3.3.2-2~)
 python3-lib2to3 : Depends: python3 (>= 3.6.6-1~) but it is not going to be installed
                   Depends: python3 (< 3.8) but it is not going to be installed
 python3-louis : Depends: python3:any (>= 3.3.2-2~)
 python3-macaroonbakery : Depends: python3:any (>= 3.5~)
 python3-mako : Depends: python3:any (>= 3.3.2-2~)
 python3-markupsafe : Depends: python3 (< 3.7) but it is not going to be installed
                      Depends: python3 (>= 3.6~) but it is not going to be installed
                      Depends: python3:any (>= 3.3.2-2~)
 python3-nacl : Depends: python3 (< 3.7) but it is not going to be installed
                Depends: python3 (>= 3.6~) but it is not going to be installed
                Depends: python3:any (>= 3.3.2-2~)
 python3-oauth : Depends: python3:any (>= 3.3.2-2~)
 python3-olefile : Depends: python3:any (>= 3.3.2-2~)
 python3-pexpect : Depends: python3:any (>= 3.3.2-2~)
 python3-pil : Depends: python3 (< 3.7) but it is not going to be installed
               Depends: python3 (>= 3.6~) but it is not going to be installed
               Depends: python3:any (>= 3.3.2-2~)
 python3-pip : Depends: python3:any (>= 3.4~)
 python3-pkg-resources : Depends: python3:any (>= 3.3.2-2~)
 python3-problem-report : Depends: python3:any (>= 3.3.2-2~)
 python3-protobuf : Depends: python3 (< 3.7) but it is not going to be installed
                    Depends: python3 (>= 3.6~) but it is not going to be installed
                    Depends: python3:any (>= 3.3.2-2~)
 python3-ptyprocess : Depends: python3:any (>= 3.3.2-2~)
 python3-pyatspi : Depends: python3:any (>= 3.3.2-2~)
 python3-pymacaroons : Depends: python3:any (>= 3.3.2-2~)
 python3-renderpm : Depends: python3 (< 3.7) but it is not going to be installed
                    Depends: python3 (>= 3.6~) but it is not going to be installed
 python3-reportlab : Depends: python3:any (>= 3.3.2-2~)
 python3-reportlab-accel : Depends: python3 (< 3.7) but it is not going to be installed
                           Depends: python3 (>= 3.6~) but it is not going to be installed
 python3-requests : Depends: python3:any (>= 3.4~)
 python3-requests-unixsocket : Depends: python3:any (>= 3.3.2-2~)
 python3-rfc3339 : Depends: python3:any (>= 3.3.2-2~)
 python3-secretstorage : Depends: python3:any (>= 3.3.2-2~)
 python3-setuptools : Depends: python3:any (>= 3.3.2-2~)
 python3-simplejson : Depends: python3 (< 3.7) but it is not going to be installed
                      Depends: python3 (>= 3.6~) but it is not going to be installed
                      Depends: python3:any (>= 3.3.2-2~)
 python3-six : Depends: python3:any (>= 3.4~)
 python3-software-properties : Depends: python3:any (>= 3.3.2-2~)
                               Depends: python3 but it is not going to be installed
 python3-speechd : Depends: python3:any (>= 3.3.2-2~)
 python3-systemd : Depends: python3 (< 3.7) but it is not going to be installed
                   Depends: python3 (>= 3.6~) but it is not going to be installed
                   Depends: python3:any (>= 3.3.2-2~)
 python3-tk : Depends: python3 (>= 3.6.6-1~) but it is not going to be installed
              Depends: python3 (< 3.8) but it is not going to be installed
 python3-tz : Depends: python3:any (>= 3.3.2-2~)
 python3-uno : Depends: python3:any (>= 3.3.2-2~)
               Depends: python3 (< 3.7) but it is not going to be installed
               Depends: python3 (>= 3.6~) but it is not going to be installed
 python3-update-manager : Depends: python3:any (>= 3.3.2-2~)
 python3-urllib3 : Depends: python3:any (>= 3.3.2-2~)
 python3-venv : Depends: python3 (= 3.6.7-1~18.04) but it is not going to be installed
 python3-wadllib : Depends: python3:any (>= 3.4~)
 python3-wheel : Depends: python3:any (>= 3.3.2-2~)
 python3-xdg : Depends: python3:any (>= 3.3.2-2~)
 python3-xkit : Depends: python3:any (>= 3.3.2-2~)
 python3-yaml : Depends: python3 (< 3.7) but it is not going to be installed
                Depends: python3 (>= 3.6~) but it is not going to be installed
                Depends: python3:any (>= 3.3.2-2~)
 python3-zope.interface : Depends: python3 (< 3.7) but it is not going to be installed
                          Depends: python3 (>= 3.6~) but it is not going to be installed
                          Depends: python3:any (>= 3.3.2-2~)
 rhythmbox-plugin-alternative-toolbar : Depends: python3:any (>= 3.3.2-2~)
 rhythmbox-plugins : Depends: python3 (< 3.7) but it is not going to be installed
                     Depends: python3 (>= 3.6~) but it is not going to be installed
                     Depends: python3:any (>= 3.3.2-2~)
 rlwrap : Depends: python3:any (>= 3.3.2-2~)
 software-properties-common : Depends: python3:any (>= 3.3.2-2~)
                              Depends: python3 but it is not going to be installed
 software-properties-gtk : Depends: python3:any (>= 3.3.2-2~)
                           Depends: python3 but it is not going to be installed
 ssh-import-id : Depends: python3:any (>= 3.3.2-2~)
 system-config-printer : Depends: python3:any (>= 3.3.2-2~)
 system-config-printer-common : Depends: python3:any (>= 3.3.2-2~)
 system-config-printer-udev : Depends: python3:any (>= 3.3.2-2~)
 ubuntu-drivers-common : Depends: python3:any (>= 3.3.2-2~)
 ubuntu-minimal : Depends: python3 but it is not going to be installed
 ubuntu-release-upgrader-core : Depends: python3:any (>= 3.2~)
 ubuntu-system-service : Depends: python3:any (>= 3.3.2-2~)
 ubuntu-web-launchers : Depends: python3 but it is not going to be installed
 ufw : Depends: python3:any (>= 3.3.2-2~)
 unattended-upgrades : Depends: python3 but it is not going to be installed
 update-manager : Depends: python3:any (>= 3.3.2-2~)
 update-manager-core : Depends: python3:any (>= 3.2~)
 update-notifier-common : Depends: python3:any
 usb-creator-common : Depends: python3:any (>= 3.3.2-2~)
 usb-creator-gtk : Depends: python3:any (>= 3.3.2-2~)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

输出sudo apt install python3

$: sudo apt install python3
[sudo] password for aman: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 python3 : Depends: libpython3-stdlib (= 3.6.7-1~18.04) but 3.6.5-3ubuntu1 is to be installed
 python3-dev : Depends: libpython3-dev (= 3.6.7-1~18.04) but 3.6.5-3ubuntu1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

输出apt policy python3 python3-minimal python3-dev python3-distutils python3-lib2to3 python3-tk python3-venv

$: sudo apt policy python3 python3-minimal python3-dev python3-distutils python3-lib2to3 python3-tk python3-venv
python3:
  Installed: 3.6.5-3ubuntu1
  Candidate: 3.6.7-1~18.04
  Version table:
     3.6.7-1~18.04 500
        500 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
 *** 3.6.5-3ubuntu1 100
        100 /var/lib/dpkg/status
     3.6.5-3 500
        500 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
python3-minimal:
  Installed: 3.6.7-1~18.04
  Candidate: 3.6.7-1~18.04
  Version table:
 *** 3.6.7-1~18.04 500
        500 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.6.5-3 500
        500 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
python3-dev:
  Installed: 3.6.7-1~18.04
  Candidate: 3.6.7-1~18.04
  Version table:
 *** 3.6.7-1~18.04 500
        500 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.6.5-3 500
        500 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
python3-distutils:
  Installed: 3.6.7-1~18.04
  Candidate: 3.6.7-1~18.04
  Version table:
 *** 3.6.7-1~18.04 500
        500 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://in.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages
        100 /var/lib/dpkg/status
     3.6.5-3 500
        500 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        500 http://in.archive.ubuntu.com/ubuntu bionic/main i386 Packages
python3-lib2to3:
  Installed: 3.6.7-1~18.04
  Candidate: 3.6.7-1~18.04
  Version table:
 *** 3.6.7-1~18.04 500
        500 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://in.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages
        100 /var/lib/dpkg/status
     3.6.5-3 500
        500 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        500 http://in.archive.ubuntu.com/ubuntu bionic/main i386 Packages
python3-tk:
  Installed: 3.6.7-1~18.04
  Candidate: 3.6.7-1~18.04
  Version table:
 *** 3.6.7-1~18.04 500
        500 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.6.5-3 500
        500 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
python3-venv:
  Installed: 3.6.7-1~18.04
  Candidate: 3.6.7-1~18.04
  Version table:
 *** 3.6.7-1~18.04 500
        500 http://in.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
        100 /var/lib/dpkg/status
     3.6.5-3 500
        500 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

提前致谢。

相关内容