Update Manager无法打开(与pythonverbose相关的错误)

我遇到了update-manager的问题。 昨晚,我的计算机在更新过程中突然重启。 现在它不会打开,它会一直显示在通知程序上,并显示一条消息,警告发生了错误。 当我尝试在终端上打开它时显示的错误相同:

Error in sitecustomize; set PYTHONVERBOSE for traceback: EOFError: EOF read where not expected Traceback (most recent call last): File "/usr/bin/update-manager", line 26, in  from __future__ import print_function EOFError: EOF read where not expected 

我已经在这里看到了一些问题,但是大多数都与ppas和source.list文件有关。 这似乎是更新管理器本身的一个错误。 我已经尝试删除它并重新安装,但问题仍然存在。 我还注意到另一个错误:我的源中心也没有打开。 它的消息类似于另一个消息:

 Error in sitecustomize; set PYTHONVERBOSE for traceback: EOFError: EOF read where not expected Traceback (most recent call last): File "/usr/lib/command-not-found", line 5, in  from __future__ import absolute_import, print_function EOFError: EOF read where not expected 

目前我正在使用apt-get update && upgrade进行更新,使用Synaptic进行源代码管理。 但我真的想解决这个问题。 有人可以帮忙吗?

我使用的是Ubuntu 12.10,Gnome-remix,64位。

错误消息可能是Python编译模块( .pyc )损坏的症状,鉴于意外的突然重启,这不是不可能的。 我最近和wajig一起经历过这个。

解决方案是删除与失败模块相对应的.pyc文件(在你的情况下__future__.pyc ,据我所知)。 此.pyc文件可能位于__pycache__子文件夹中。 你应该能够安全地sudo rm -r这个文件夹,它将根据需要重新创建。