0

最近我遇到了一个问题,我什至无法检查修改文件的状态。我得到如下错误:

sokmesa@sokmesa-laptop:/var/www/my_project$ hg st

Traceback (most recent call last):
 File "/usr/lib/python2.7/site.py", line 562, in <module>
   main()
 File "/usr/lib/python2.7/site.py", line 544, in main
   known_paths = addusersitepackages(known_paths)
  File "/usr/lib/python2.7/site.py", line 271, in addusersitepackages
    user_site = getusersitepackages()
  File "/usr/lib/python2.7/site.py", line 246, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/usr/lib/python2.7/site.py", line 236, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/usr/lib/python2.7/sysconfig.py", line 558, in get_config_var
    return get_config_vars().get(name)
  File "/usr/lib/python2.7/sysconfig.py", line 438, in get_config_vars
    import re
  File "/usr/lib/python2.7/re.py", line 105, in <module>
    import sre_compile
  File "/usr/lib/python2.7/sre_compile.py", line 14, in <module>
    import sre_parse
  ValueError: bad marshal data (unknown type code)
4

2 回答 2

1

运行 dpkg-reconfigure 对我不起作用,所以我删除了 .pyc 文件:

find /usr/lib/python2.7 -name \*.pyc -exec rm {} \;
于 2013-02-22T13:57:39.813 回答
0

刚刚找到解决方案sudo dpkg-reconfigure update-manager-core

于 2012-08-10T03:53:53.617 回答