升级期间子进程出错

升级期间子进程出错

今天我将系统从 16.04.1 更新到 16.10。更新过程中没有遇到任何错误,但启动到 16.10 后,当我输入 apt-get update && upgrade 命令时,它会在 20 个安装上显示错误,即使它们是最新的并且可以正常工作。它还会导致太多系统错误。

account-plugin-facebook is already the newest version (0.13+16.10.20160929.1-0ubuntu1).
account-plugin-ubuntuone is already the newest version (15.11+16.10.20160920).
click is already the newest version (0.4.45.1+16.10.20160916-0ubuntu1).
click-apparmor is already the newest version (0.3.17).
libunity-scopes1.0 is already the newest version (1.0.7+16.10.20160921-0ubuntu2).
pay-service is already the newest version (15.10+16.10.20160825-0ubuntu1).
ubuntu-app-launch is already the newest version (0.9+16.10.20160928-0ubuntu1).
ubuntu-app-launch-tools is already the newest version (0.9+16.10.20160928-0ubuntu1).
ubuntu-push-client is already the newest version (0.68+16.10.20161003-0ubuntu1).
ubuntu-system-settings is already the newest version (0.4+16.10.20160927-0ubuntu3).
ubuntu-system-settings-online-accounts is already the newest version (0.7+16.10.20161004-0ubuntu1).
unity-plugin-scopes is already the newest version (0.5.8+16.10.20160921-0ubuntu1).
unity-scope-click is already the newest version (0.1.1+16.10.20161005-0ubuntu1).
unity8 is already the newest version (8.14+16.10.20160922-0ubuntu2).
unity8-common is already the newest version (8.14+16.10.20160922-0ubuntu2).
unity8-desktop-session is already the newest version (1.0.13+16.10.20160928-0ubuntu1).
unity8-private is already the newest version (8.14+16.10.20160922-0ubuntu2).
url-dispatcher is already the newest version (0.1+16.10.20160816.1-0ubuntu1).
url-dispatcher-tools is already the newest version (0.1+16.10.20160816.1-0ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
20 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 click (0.4.45.1+16.10.20160916-0ubuntu1) ...
Traceback (most recent call last):
  File "/usr/bin/click", line 55, in <module>
    from click import commands
ImportError: cannot import name 'commands'
dpkg: error processing package click (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up click-apparmor (0.3.17) ...
Traceback (most recent call last):
  File "/usr/bin/click", line 55, in <module>
    from click import commands
ImportError: cannot import name 'commands'
dpkg: error processing package click-apparmor (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up url-dispatcher:amd64 (0.1+16.10.20160816.1-0ubuntu1) ...
Traceback (most recent call last):
  File "/usr/bin/click", line 55, in <module>
    from click import commands
ImportError: cannot import name 'commands'
dpkg: error processing package url-dispatcher:amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of ubuntu-app-launch:
 ubuntu-app-launch depends on click-apparmor; however:
  Package click-apparmor is not configured yet.

dpkg: error processing package ubuntu-app-launch (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of ubuntu-system-settings:
 ubuntu-system-settings depends on click | ubuntu-snappy-cli; however:
  Package click is not configured yet.
  Package ubuntu-snappy-cli is not installed.

dpkg: error processing package ubuntu-system-settings (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of url-dispatcher-tools:
 url-dispatcher-tools depends on url-dispatcher (= 0.1+16.10.20160816.1-0ubuntu1); however:
  Package url-dispatcher:amd64 is not configured yet.

dpkg: error processing package url-dispatcher-tools (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-app-launch-tools:
 ubuntu-app-launch-tools depends on ubuntu-app-launch (= 0.9+16.10.20160928-0ubuntu1); however:
  Package ubuntu-app-launch is not configured yet.

dpkg: error processing package ubuntu-app-launch-tools (--configure):
 dependency problems - leaving unconNo 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
                                                             figured
Setting up libunity-scopes1.0:amd64 (1.0.7+16.10.20160921-0ubuntu2) ...
Traceback (most recent call last):
  File "/usr/bin/click", line 55, in <module>
    from click import commands
ImportError: cannot import name 'commands'
dpkg: error processing package libunity-scopes1.0:amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of ubuntu-system-settings-online-accounts:
 ubuntu-system-settings-online-accounts depends on ubuntu-system-settings; however:
  Package ubuntu-system-settings is not configured yet.

dpkg: error processing package ubuntu-system-settings-online-accounts (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of unity8:
 unity8 depends on ubuntu-system-settings (>= 0.4); however:
  Package ubuntu-system-settings is not configured yet.

dpkg: error processing package unity8 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of account-plugin-ubuntuone:
 account-plugin-ubuntuone depends on ubuntu-system-settings-online-accounts; however:
  Package ubuntu-system-settings-online-accounts is not configured yet.

dpkg: error processing package account-plugin-ubuntuone (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of unity-plugin-scopes:amd64:
 unity-plugin-scopes:amd64 depends on libunity-scopes1.0; however:
  Package libunity-scopes1.0:amd64 is not configured yet.

dpkg: error processing package unity-plugin-scopes:amd64 (--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 unity-greeter-session-broadcast:
 unity-greeter-session-broadcast depends on url-dispatcher-tools; however:
  Package url-dispatcher-tools is not configured yet.

dpkg: error processing package unity-greeter-session-broadcast (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of unity8-desktop-session:
 unity8-desktop-session depends on ubuntu-app-launch; however:
  Package ubuntu-app-launch is not configured yet.
 unity8-desktop-session depends on unity8; however:
  Package unity8 is not configured yet.
 unity8-desktop-session depends on url-dispatcher; however:
  Package url-dispatcher:amd64 is not configured yet.

dpkg: error processing package unity8-desktop-session (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of ubuntu-push-client:
 ubuntu-push-client depends on url-dispatcher; however:
  Package url-dispatcher:amd64 is not configured yet.

dpkg: error processing package ubuntu-push-client (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of unity-scope-click:
 unity-scope-click depends on account-plugin-ubuntuone; however:
  Package account-plugin-ubuntuone is not configured yet.
 unity-scope-click depends on ubuntu-app-launch-tools; however:
  Package ubuntu-app-launch-tools is not configured yet.
 unity-scope-click depends on libunity-scopes1.0; however:
  Package libunity-scopes1.0:amd64 is not configured yet.

dpkg: error processing package unity-scope-click (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of account-plugin-facebook:
 account-plugin-facebook depends on libaccount-plugin-facebook | ubuntu-system-settings-online-accounts; however:
  Package libaccount-plugin-facebook is not installed.
  Package ubuntu-system-settings-online-accounts is not configured yet.

dpkg: error processing package account-plugin-facebook (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of pay-service:
 pay-service depends on ubuntu-push-client (>= 0.68+15.04.20151009); however:
  Package ubuntu-push-client is not configured yet.

dpkg: error processing package pay-service (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of unity8-common:
 unity8-common depends on unity-plugin-scopes | unity-scopes-impl; however:
  Package unity-plugin-scopes:amd64 is not configured yet.
  Package unity-scopes-impl is not installed.
  Package unity-plugin-scopes:amd64 which provides unity-scopes-impl is not configured yet.
 unity8-common depends on unity-scopes-impl-12; however:
  Package unity-scopes-impl-12 is not installed.
  Package unity-plugin-scopes:amd64 which provides unity-scopes-impl-12 is not configured yet.

dpkg: error processing package unity8-common (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of unity8-private:amd64:
 unity8-private:amd64 depends on pay-service; however:
  Package pay-service is not configured yet.

dpkg: error processing package unity8-private:amd64 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Processing triggers for libc-bin (2.24-3ubuntu1) ...
Errors were encountered while processing:
 click
 click-apparmor
 url-dispatcher:amd64
 ubuntu-app-launch
 ubuntu-system-settings
 url-dispatcher-tools
 ubuntu-app-launch-tools
 libunity-scopes1.0:amd64
 ubuntu-system-settings-online-accounts
 unity8
 account-plugin-ubuntuone
 unity-plugin-scopes:amd64
 unity-greeter-session-broadcast
 unity8-desktop-session
 ubuntu-push-client
 unity-scope-click
 account-plugin-facebook
 pay-service
 unity8-common
 unity8-private:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

从 16.04 升级到 16.10 时,我遇到了同样的问题。正如一个输出所示,VeeeneX 已回答,我通过卸载“click”Python 包解决了这个问题:

sudo pip3 卸载点击

之后,我可以使用以下命令完成 Ubuntu 16.10 的安装:

sudo apt-get -f 安装

这很奇怪。我不记得使用 Python 包管理器 (pip3) 手动安装了“click”包,所以这看起来像是 Ubuntu 升级过程的一个缺陷。

答案2

只需返回 16.04 LTS,如果要删除 unity,请执行以下命令:

sudo pip3 uninstall click
sudo apt-get purge click

相关内容