问题描述:
在Ubuntu20.04服务器上安装gdb,本地Clion调用服务器远程gdb进行远程开发时机器检测不到gdb。在服务器上测试gdb时发生下述报错。
环境
服务器:Ubuntu20
python环境:使用pyenv安装的python3.9.0,已设置为全局版本,能正常使用。pyenv安装在如下路径:/usr/local/.pyenv
gdb
报错详情:
root@hecs:/usr/lib# gdb --help
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = '/usr/bin/python'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/usr/bin/python'
sys.base_prefix = '/usr'
sys.base_exec_prefix = '/usr'
sys.executable = '/usr/bin/python'
sys.prefix = '/usr'
sys.exec_prefix = '/usr'
sys.path = [
'/usr/lib/python38.zip',
'/usr/lib/python3.8',
'/usr/lib/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007f131c880600 (most recent call first):
<no Python frame>
请求各位解答!
gdb无法调用,现在本地Clion就无法调试代码(开始是好的,不知怎么滴就出问题了,呜~~),希望得到各位的帮助!