简体   繁体   English

GDB崩溃 - UNEXPECTED GDB STDERR:致命Python错误:Py_Initialize:无法获取语言环境编码

[英]GDB crashing - UNEXPECTED GDB STDERR: Fatal Python error: Py_Initialize: Unable to get the locale encoding

I am using QtCreator in ubuntu(virtual box) to run a simple c++ program(hello.cpp). 我在ubuntu(虚拟盒子)中使用QtCreator来运行一个简单的c ++程序(hello.cpp)。 The QtCreator is building and running the application fine .But when it is not letting me to debug. QtCreator正在构建和运行应用程序。但是当它不让我调试时。 I am running a shell script on ubuntu of vbox to get some cross compilers required, since i have a hard ware which holds arm architecture. 我正在vbox的ubuntu上运行一个shell脚本来获得一些需要的交叉编译器,因为我有一个可以保存arm架构的硬件。 finally i want to push the cross compiled executable on to the hardware and do remote debugging. 最后,我想将交叉编译的可执行文件推送到硬件上并进行远程调试。 Before that i am trying to perfrom desktop debugging on ubuntu, but the GDB is crashing. 在此之前,我试图在ubuntu上进行桌面调试,但GDB正在崩溃。 I think GDB is getting confused with some python path. 我认为GDB正在与一些python路径混淆。 Can anyone help me with this? 谁能帮我这个? Here is the picture of GDB log: 这是GDB日志的图片:

GDB日志

This error most likely means that Python isn't installed properly on your machine. 此错误很可能意味着您的计算机上未正确安装Python。 This error comes during gdb initialization, when it tries to initialize the Python interpreter. 在gdb初始化期间,当它尝试初始化Python解释器时,会出现此错误。 If Py_Initialize fails, there isn't much gdb can do about it... 如果Py_Initialize失败,那么gdb可以做些什么呢......

The issue is due to gdb optimization environment variables. 问题是由于gdb优化环境变量。 there are 4 variables in in the ide, configured with -o2 optimization. ide中有4个变量,配置-o2优化。 Remove the -o2 optimization in the front of variables, then it will resolve your issue. 删除变量前面的-o2优化,然后它将解决您的问题。 In my case its -o2, in your case, it can be other optimizations. 在我的情况下,它的-o2,在你的情况下,它可以是其他优化。 Please look for them. 请找他们。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python3.3-致命的Python错误:Py_Initialize:无法获取语言环境编码 - Python3.3 - Fatal Python error: Py_Initialize: Unable to get the locale encoding gcc 6.3 --> 致命 Python 错误:Py_Initialize:无法获取语言环境编码 ModuleNotFoundError:没有名为“编码”的模块 - gcc 6.3 --> Fatal Python error: Py_Initialize: Unable to get the locale encoding ModuleNotFoundError: No module named 'encodings' uWSGI致命Python错误:Py_Initialize:无法获取语言环境编码 - uWSGI Fatal Python error: Py_Initialize: Unable to get the locale encoding 致命的Python错误:Py_Initialize:当从Abaqus子例程调用Python时,无法获得语言环境编码错误 - Fatal Python error: Py_Initialize: Unable to get the locale encoding error when Python called from Abaqus subroutine Ubuntu,Apache2,Django)致命Python错误:Py_Initialize:无法获取区域设置编码ImportError:没有名为“ encodings”的模块 - Ubuntu , Apache2 , Django ) Fatal Python error: Py_Initialize: Unable to get the locale encoding ImportError: No module named 'encodings' Uwsgi失败:Py_Initialize:无法获取语言环境编码 - Uwsgi fails with: Py_Initialize: Unable to get the locale encoding 致命的Python错误:Py_Initialize() - Fatal Python error: Py_Initialize() 致命的Python错误:Py_Initialize:无法初始化sys标准流LookupError:未知编码:65001 - Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding: 65001 致命的Python错误:Py_Initialize:无法加载文件系统编解码器和ModuleNotFoundError - Fatal Python error: Py_Initialize: unable to load the file system codec & ModuleNotFoundError 致命的 Python 错误:Py_Initialize:无法加载文件系统编解码器。 导入错误:没有名为“编码”的模块 - Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM