解决gdb报错:Failed to import the site module,No module named '_sysconfigdata_m'

最近使用gdb,一直报错:


Failed to import the site module

Traceback (most recent call last):

 File "/usr/lib/python3.5/site.py", line 580, in <module>

   main()

 File "/usr/lib/python3.5/site.py", line 566, in main

   known_paths = addusersitepackages(known_paths)

 File "/usr/lib/python3.5/site.py", line 287, in addusersitepackages

   user_site = getusersitepackages()

 File "/usr/lib/python3.5/site.py", line 263, in getusersitepackages

   user_base = getuserbase() # this will also set USER_BASE

 File "/usr/lib/python3.5/site.py", line 253, in getuserbase

   USER_BASE = get_config_var('userbase')

 File "/usr/lib/python3.5/sysconfig.py", line 595, in get_config_var

   return get_config_vars().get(name)

 File "/usr/lib/python3.5/sysconfig.py", line 538, in get_config_vars

   _init_posix(_CONFIG_VARS)

 File "/usr/lib/python3.5/sysconfig.py", line 410, in _init_posix

   from _sysconfigdata import build_time_vars

 File "/usr/lib/python3.5/_sysconfigdata.py", line 6, in <module>

   from _sysconfigdata_m import *

ImportError: No module named '_sysconfigdata_m'


吾只搜索了开始的,说是跟python有关.后来同事搜索了最后一句错误,找到了解决办法:


# cd /usr/lib/python3.4
 
# ln  -s /usr/lib/python3.4/plat-i386-linux-gnu/_sysconfigdata_m.py .
上一篇:利用AX产品提升DNS服务器可用性和安全性的一种有效解决方案


下一篇:sign check fail:check Sign and Data Fail报错攻略