最近我遇到了hg的问题,我甚至无法检查修改文件的状态。我收到如下错误:
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)
答案 0 :(得分:1)
运行dpkg-reconfigure对我不起作用,所以我删除了.pyc文件:
find /usr/lib/python2.7 -name \*.pyc -exec rm {} \;
答案 1 :(得分:0)
刚刚找到解决方案sudo dpkg-reconfigure update-manager-core