Python的默认版本错误

一段时间以来,我一直在做任何与apt-get相关的任务时遇到这个错误:

 Preparing to replace python-cairo 1.4.12-1.2 (using .../python-cairo_1.8.8-1+b1_i386.deb) ... Traceback (most recent call last): [...] File "/usr/share/pycentral-data/pyversions.py", line 172, in default_version raise ValueError, "/usr/bin/python does not match the python default version. It must be reset to point to %s" % debian_default ValueError: /usr/bin/python does not match the python default version. It must be reset to point to python2.6.6 

 robus:/# /usr/bin/python -V Python 2.6.6 

我该如何解决? 我曾尝试修复符号链接,但是我一直得到“太多符号链接级别”的错误。

我有点惊讶,它需要python2.6.6而不是python2.6 (对于打包目的,通常只使用两部分的版本号)。 这似乎来自/usr/share/python/debian_defaults ,它在我的系统上包含default-version = python2.7 。 你的文件中的default-version行包含什么,并且在你的系统上这个文件已经被改变了?