![Ubuntu - 12.04 更新管理器和软件中心不工作](https://linux22.com/image/1043244/Ubuntu%20-%2012.04%20%E6%9B%B4%E6%96%B0%E7%AE%A1%E7%90%86%E5%99%A8%E5%92%8C%E8%BD%AF%E4%BB%B6%E4%B8%AD%E5%BF%83%E4%B8%8D%E5%B7%A5%E4%BD%9C.png)
我的机器上安装了 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 支持