在一个系统上运行 dist-upgrade 后,我收到此错误:
Sorry: TypeError: compile() expected string without null bytesdpkg: error processing package python2.7 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python:
python depends on python2.7 (>= 2.7.9-1~); however:
Package python2.7 is not configured yet.
做手册时也会发生同样的错误dpkg -i
:
aleph /var/cache/apt/archives # dpkg -r python2.7
(Reading database ... 39002 files and directories currently installed.)
Removing python2.7 (2.7.9-2) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for mime-support (3.58) ...
aleph /var/cache/apt/archives # dpkg -i python2.7_2.7.9-2_amd64.deb
(Reading database ... 39380 files and directories currently installed.)
Preparing to unpack python2.7_2.7.9-2_amd64.deb ...
Unpacking python2.7 (2.7.9-2) over (2.7.9-2) ...
Setting up python2.7 (2.7.9-2) ...
Sorry: TypeError: compile() expected string without null bytesdpkg: error processing package python2.7 (--install):
subprocess installed post-installation script returned error exit status 1
Processing triggers for mime-support (3.58) ...
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
python2.7
这也破坏了所有其他包(即rdiff-backup
或xen
)。
我有点困惑,因为我在网上找不到任何明确的参考资料。我重新启动了服务器,尝试了 apt-get (auto)clean 等。一切似乎都很好(不是损坏的包或 fs?)。
我可以尝试的下一步是什么?
这是由损坏的文件引起的。
我安装
debsums
并在所有文件上运行它。Grepping 失败了。损坏的文件之一是
topics.py
(/usr/lib/python2.7/pydoc_data/topics.py
)。我将文件从另一台工作机器转移到那台机器上,然后重新安装了 python2.7。
之后它工作得很好。
我也有几个段错误(其他问题?)——重启后就消失了