当我运行时sudo apt-get upgrade
,出现 dpkg 错误并中断进程。
错误详情:
Setting up python-minimal (2.7.3-0ubuntu7.1) ...
Traceback (most recent call last):
File "/usr/local/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/local/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/compileall.py", line 16, in <module>
import struct
File "/usr/local/lib/python2.7/struct.py", line 1, in <module>
from _struct import *
ImportError: No module named _struct
dpkg: error processing python-minimal (--configure):
subprocess installed post-installation script returned error exit status 255
dpkg: dependency problems prevent configuration …
Run Code Online (Sandbox Code Playgroud) 一切都很顺利,直到今天我决定将 Ubuntu 16.04.3升级到16.04.4
在安装下载的更新的最后阶段时,python-minimal
打包安装失败并出现以下错误:
Setting up python-minimal (2.7.12-1~16.04) ...
Traceback (most recent call last):
File "/usr/local/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/local/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/compileall.py", line 16, in <module>
import struct
File "/usr/local/lib/python2.7/struct.py", line 1, in <module>
from _struct import *
ImportError: No module named _struct
dpkg: error processing package python-minimal (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while …
Run Code Online (Sandbox Code Playgroud)