在 Xubuntu 12.10 上运行 apt-get 时出现“无法导入 runpy 模块”

在 Xubuntu 12.10 上运行 apt-get 时出现“无法导入 runpy 模块”

刚刚安装了 Xubuntu 12.10,第一次 apt-get 更新和升级后 Could not import runpy module,所有安装似乎都停止在那里。

例如sudo apt-get --reinstall install python给出以下内容

[...]
running python rtupdate hooks for python3.2...
Could not import runpy module
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 289, in <module>
    main()
  File "/usr/bin/py3compile", line 283, in main
    process.communicate()
  File "/usr/lib/python3.2/subprocess.py", line 809, in communicate
    self.stdin.close()
IOError: [Errno 32] Broken pipe
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 4, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 12, in <module>
    import subprocess, tempfile, os.path, re, pwd, grp, os
EOFError: EOF read where not expected<br/>
[...]
dpkg: error processing python3-aptdaemon.pkcompat (--configure):
 dependency problems - leaving unconfigured
Setting up python (2.7.3-0ubuntu7) ...
Errors were encountered while processing:
 python3
 python3-dbus
 python3-distupgrade
 python3-update-manager
 python3-gi
 ufw
 python3-problem-report
 python3-apport
 python3-aptdaemon
 python3-aptdaemon.gtk3widgets
 python3-aptdaemon.pkcompat
E: Sub-process /usr/bin/dpkg returned an error code (1)
[...]

非常感谢所有帮助解决这一问题的人。matti

答案1

这是一个尚未修复的错误。请参阅错误 #1024016.也许你可以尝试这边走在#31楼或者apt-get remove python3并等待错误被修复。

相关内容