最近在一个Ubuntu的机器上,调试程序,每步调试都输出几条Python Exception <type 'exceptions.NameError'> Installation error: gdb.execute_unwinders function is missing:,看着很不习惯,于是找了个方法解决了下这个问题。
出现这个问题的原因一般是GDB没有装好的缘故。解决步骤如下:
1)移除gdb:sudo apt-get purge gdb
2) 源码方式安装gdb (说明:如果编译过程有出现PyUnicodeUCS2_Decode未定义的引用问题,导致编译无法通过时,执行./configure时,请添加--enable-unicode=ucs4 选项设置,如下所示)
./configure --enable-unicode=ucs4 && make -j4 && sudo make install
3)在sudo make install 时,若提示缺少makeinfo,导致无法install时,请根据提示信息,执行:sudo apt-get install texinfo
通过以上几个步骤,一般都可以解决该问题。