无法在 Ubuntu 15.10 中启动软件中心或软件更新程序

无法在 Ubuntu 15.10 中启动软件中心或软件更新程序

几天前,我开始看到一个红色圆圈,里面有一条白线,上面写着:“检查更新时出现问题

当我在该菜单中选择“显示更新”时,我在系统日志中看到以下内容:

May 23 10:00:05 scorpio gnome-session[2032]: Traceback (most recent call last):
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/bin/update-manager", line 38, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: from UpdateManager.UpdateManager import UpdateManager
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 57, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: from .MetaReleaseGObject import MetaRelease
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/lib/python3/dist-packages/UpdateManager/MetaReleaseGObject.py", line 25, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: from .Core.MetaRelease import MetaReleaseCore
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py", line 25, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: import apt
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/lib/python3/dist-packages/apt/__init__.py", line 26, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: from apt.package import Package
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/lib/python3/dist-packages/apt/package.py", line 42, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: import apt.progress.text
May 23 10:00:05 scorpio gnome-session[2032]: ImportError: No module named 'apt.progress'
May 23 10:00:05 scorpio gnome-session[2032]: Error in sys.excepthook:
May 23 10:00:05 scorpio gnome-session[2032]: Traceback (most recent call last):
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
May 23 10:00:05 scorpio gnome-session[2032]: from apport.fileutils import likely_packaged, get_recent_crashes
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: from apport.report import Report
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: import apport.fileutils
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: from apport.packaging_impl import impl as packaging
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: import apt
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/lib/python3/dist-packages/apt/__init__.py", line 26, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: from apt.package import Package
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/lib/python3/dist-packages/apt/package.py", line 42, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: import apt.progress.text
May 23 10:00:05 scorpio gnome-session[2032]: ImportError: No module named 'apt.progress'
May 23 10:00:05 scorpio gnome-session[2032]: Original exception was:
May 23 10:00:05 scorpio gnome-session[2032]: Traceback (most recent call last):
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/bin/update-manager", line 38, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: from UpdateManager.UpdateManager import UpdateManager
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 57, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: from .MetaReleaseGObject import MetaRelease
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/lib/python3/dist-packages/UpdateManager/MetaReleaseGObject.py", line 25, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: from .Core.MetaRelease import MetaReleaseCore
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py", line 25, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: import apt
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/lib/python3/dist-packages/apt/__init__.py", line 26, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: from apt.package import Package
May 23 10:00:05 scorpio gnome-session[2032]: File "/usr/lib/python3/dist-packages/apt/package.py", line 42, in <module>
May 23 10:00:05 scorpio gnome-session[2032]: import apt.progress.text
May 23 10:00:05 scorpio gnome-session[2032]: ImportError: No module named 'apt.progress'

运行软件中心时,我遇到了类似的错误(关于 apt.progress Python 模块)。

在寻找答案时,我发现软件更新程序存在很多问题,但似乎都没有解决这个问题。

我点击“升级“在更新程序中,但没有升级。我最近还使用apt-get命令行安装了 mysql。我精通命令行(Solaris、OSX)和中级 Linux。我不确定我需要用 Python 做什么来解决这个问题。我最近将我的日常工作流程从 OSX 迁移到 Ubuntu,如果没有必要,我不愿意尝试重新安装和重新配置一切。

答案1

似乎某个软件包已损坏,缺少一些重要文件。您需要重新安装该软件包python3-apt,并且为了安全起见,请执行以下操作ubuntu-desktop

sudo apt-get install --reinstall ubuntu-desktop python3-apt

为了尽早甚至在将来自动检测损坏的软件包,您可以参考“Ubuntu 有健全性检查吗?”。

相关内容