AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 685695
Accepted
Tuinslak
Tuinslak
Asked: 2015-04-27 10:02:33 +0800 CST2015-04-27 10:02:33 +0800 CST 2015-04-27 10:02:33 +0800 CST

将 Debian 更新为 Jessie 后的 Python2.7 问题

  • 772

在一个系统上运行 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?)。

我可以尝试的下一步是什么?

debian
  • 1 1 个回答
  • 995 Views

1 个回答

  • Voted
  1. Best Answer
    Tuinslak
    2015-04-27T11:02:59+08:002015-04-27T11:02:59+08:00

    这是由损坏的文件引起的。

    我安装debsums并在所有文件上运行它。Grepping 失败了。

    损坏的文件之一是topics.py( /usr/lib/python2.7/pydoc_data/topics.py)。

    我将文件从另一台工作机器转移到那台机器上,然后重新安装了 python2.7。

    之后它工作得很好。

    我也有几个段错误(其他问题?)——重启后就消失了

    • 0

相关问题

  • 关闭 FTP

  • 如何在同一台电脑上从 putty 连接 debian vmware

  • debian- 文件到包的映射

  • Debian Ubuntu 网络管理器错误 [关闭]

  • 为本地网络中的名称解析添加自定义 dns 条目

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve