root@odroid:/var/cache/apt/archives# sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
root@odroid:/var/cache/apt/archives# sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
64 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python3 (3.5.1-3) ...
running python rtupdate hooks for python3.5...
File "/usr/bin/py3clean", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
error running python rtupdate hook dh-python
File "/usr/bin/py3clean", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
error running python rtupdate hook gdebi-core
dpkg: error processing package python3-html5lib (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of python3-lxml:
python3-lxml depends on python3 (<< 3.6); however:
Package python3 is not configured yet.
python3-lxml depends on python3 (>= 3.5~); however:
Package python3 is not configured yet.
dpkg: error processing package python3-lxml (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of python3-numpy:
python3-numpy depends on python3 (<< 3.6); however:
Package python3 is not configured yet.
python3-numpy depends on python3 (>= 3.5~); however:
Package python3 is not configured yet.
dpkg: error processing package python3-numpy (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of python3-pil:armhf:
python3-pil:armhf depends on python3 (<< 3.6); however:
Package python3 is not configured yet.
python3-pil:armhf depends on python3 (>= 3.5~); however:
Package python3 is not configured yet.
dpkg: error processing package python3-pil:armhf (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of python3-pip:
python3-pip depends on python3:any (>= 3.4~); however:
Package python3 is not configured yet.
dpkg: error processing package python3-pip (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of python3-polib:
python3-polib depends on python3:any (>= 3.3.2-2~); however:
Package python3 is not configured yet.
dpkg: error processing package python3-polib (--configure):
dependency problems - leaving unconfigured
dpkg: too many errors, stopping
No apport report written because MaxReports is reached already
Errors were encountered while processing:
python3
python3-apt
python3-dbus
language-selector-common
ubuntu-drivers-common
python3-pkg-resources
python3-chardet
python3-debian
python3-lxml
python3-numpy
python3-pil:armhf
python3-pip
python3-polib
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
我使用 sudo apt-get remove 卸载了 python2
嗯,这是一个错误,至少对于 Ubuntu 16.04(及更早版本)及其衍生版本而言。
这两个 Python 版本都在 apt-get 及其所有子函数中使用。
遗憾的是,除了重新安装操作系统之外,我还没有发现如何“修复”该错误的描述。
如果您已经安装了 synaptic - 您可以尝试重新安装 Python2,但这可能只是所需的开始。
注意:尝试升级所包含的 Python 版本时也可能会出现上述问题。