错误:子进程 /usr/bin/dpkg 返回错误代码 (1)

错误:子进程 /usr/bin/dpkg 返回错误代码 (1)

运行以下命令:

sudo apt-get install --重新安装 python3

输出:

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Reinstallation of python3 is not possible, it cannot be downloaded.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    54 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue? [Y/n] Y
    Setting up python3.5-minimal (3.5.2-2ubuntu0~16.04.1) ...
    Could not find platform independent libraries <prefix>
    Could not find platform dependent libraries <exec_prefix>
    Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
    Fatal Python error: Py_Initialize: Unable to get the locale encoding
    ImportError: No module named 'encodings'

    Current thread 0x00007f91aa5f8700 (most recent call first):
    Aborted (core dumped)
    dpkg: error processing package python3.5-minimal (--configure):

    subprocess installed post-installation script returned error exit status 134
    Setting up python3-apt (1.1.0~beta1build1) ...
    Could not find platform independent libraries <prefix>
    Could not find platform dependent libraries <exec_prefix>
    Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
    Fatal Python error: Py_Initialize: Unable to get the locale encoding
    ImportError: No module named 'encodings'


    dpkg: error processing package python3-gi (--configure):
    subprocess installed post-installation script returned error exit status        134
    No apport report written because MaxReports is reached already
    dpkg: dependency               problems prevent configuration of apport:
    apport depends on python3-gi; however:
    Package python3-gi is not configured yet.

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

    dpkg: error processing package apport-gtk (--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-apt (>= 0.8.5~ubuntu1); however:
    Package python3-apt is not configured yet.
    python3-aptdaemon depends on python3-dbus; however:
    Package python3-dbus is not configured yet.
    python3-aptdaemon depends on python3-gi; however:
    Package python3-gi is not configured yet.

    dpkg: error processing package python3-aptdaemon (--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-aptdaemon (= 1.1.1+bzr982-0ubuntu14); however:
    Package python3-aptdaemon is not configured yet.
    python3-aptdaemon.gtk3widgets depends on python3-gi; however:
    Package python3-gi 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: error processing package usb-creator-gtk (--configure):
    dependency problems - leaving unconfigured
    dpkg: too many errors, stopping
    No apport report written because MaxReports is reached already
    Processing triggers for libc-bin (2.23-0ubuntu7) ...
    Errors were encountered while processing:
    python3.5-minimal
    python3-apt
    ubuntu-drivers-common
    python3-dbus
    update-notifier-common
    python3-gi
    apport
    apport-gtk
    python3-aptdaemon
    python3-aptdaemon.gtk3widgets
    apturl
    python3-cairo
    python3-gi-cairo
    gedit
    python3-pyatspi
    gnome-orca
    ibus-table
    kazam
    language-selector-gnome
    onboard
    python3-lxml
    python3-checkbox-support
    python3-commandnotfound
    python3-cryptography
    python3-distupgrade
    python3-update-manager
    python3-markupsafe
    python3-jinja2
    python3-mako
    python3-minimal
    python3-oauthlib
    python3-pil:amd64
    python3-plainbox
    python3-pycurl
    python3-reportlab
    python3-software-properties
    software-properties-common
    python3-systemd
    python3.5
    python3-uno
    rhythmbox
    rhythmbox-plugin-zeitgeist
    rhythmbox-plugins
    totem-plugins
    ubuntu-release-upgrader-core
    ubuntu-system-service
    unattended-upgrades
    update-manager-core
    update-notifier
    update-manager
    usb-creator-gtk
    Processing was halted because there were too many errors.
    E: Sub-process /usr/bin/dpkg returned an error code (1)

有什么方法可以解决这个问题吗?谢谢。

相关内容