How to Fix gdb error: Failed to import the site module,No module named ‘_sysconfigdata_m’

GDB has been used recently and has been reporting errors:
Failed to import the site module
Traceback (the most recent call last) :
the File “/ usr/lib/python3.5/site. Py”, line 580, in & lt; module>

the main () the File “/ usr/lib/python3.5/site. Py”, line 566, in the main
known_paths = addusersitepackages (known_paths)
the File “/ usr/lib/python3.5/site. Py”, line 287, In addusersitepackages
user_site = getusersitepackages ()
the File “/ usr/lib/python3.5/site. Py”, line 263, In getusersitepackages
user_base = getuserbase # () this will also set user_base
the File “/ usr/lib/python3.5/site. Py”, line 253, In getuserbase
USER_BASE = get_config_var (‘ userbase)
the File “/ usr/lib/python3.5/sysconfig py”, line 595, In get_config_var
return get_config_vars () get (name)
the File “/ usr/lib/python3.5/sysconfig py”, line 538, In get_config_vars
_init_posix (_CONFIG_VARS)
the 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’
I only searched the beginning one, which said it had to do with Python. Later, a colleague searched for the last sentence error and found a solution:

# cd /usr/lib/python3.4

# ln  -s /usr/lib/python3.4/plat-i386-linux-gnu/_sysconfigdata_m.py .

 

Read More: