我的机器上安装了 Ubuntu 12.04 LTS。通过更新管理器应用一些软件包后,更新管理器和软件中心无法正常工作。以下是我在终端上执行命令 update-manager 时得到的错误跟踪。
我尝试通过以下方式解决此问题重新安装 python一次又一次将 Python 升级到 2.7.4.但问题依然存在。
有人能帮我吗?
Traceback (most recent call last):
File "/usr/bin/update-manager", line 33, in
from UpdateManager.UpdateManager import UpdateManager
File "/usr/lib/python2.7/dist-packages/UpdateManager/UpdateManager.py", line 41, in
import gettext
File "/usr/lib/python2.7/gettext.py", line 49, in
import locale, copy, os, re, struct, sys
File "/usr/lib/python2.7/locale.py", line 15, in
import encodings
File "/usr/lib/python2.7/encodings/__init__.py", line 32, in
ImportError: cannot import name aliases
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 66, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 8, in
import gettext
File "/usr/lib/python2.7/gettext.py", line 49, in
import locale, copy, os, re, struct, sys
File "/usr/lib/python2.7/locale.py", line 15, in
import encodings
File "/usr/lib/python2.7/encodings/__init__.py", line 32, in
ImportError: cannot import name aliases
答案1
我可以通过重新安装以下软件包来解决这个问题。
- python(从 2.7.3 升级到 2.7.5)
- python2.7-最低版本
- python 支持