无法在 ubuntu : Could not find platform independent libraries 上运行 gdb

标签 c ubuntu gdb

不能运行 'gdb ./a.out' 甚至 'gdb --help' 没有得到:

$ gdb ./a.out 
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site

Ubuntu Desktop 12.04 LTS 是最新的。在“根”中工作。我宁愿不对 $PYTHONHOME 位置进行硬编码。任何提示表示赞赏。莫名其妙。

更新:当我设置 $PYTHONHOME 时,我得到:

$ PYTHONHOME=/usr/lib/python2.7 gdb ./a.out 
ImportError: No module named site

更新:我确实安装了 python-dev 来创建原生模块。

谢谢

最佳答案

你会遇到这个 bug 吗? ?你有安装pythonpython-libs吗?

关于无法在 ubuntu : Could not find platform independent libraries 上运行 gdb,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18937526/

相关文章:

c - 无法写入c中的文件

php - 无法创建文件夹 Zipper/laravel

ruby-on-rails - 错误的 URI(不是 URI?)在 ubuntu 终端中运行 rails 时

c - a+5 是 C 中的有效表达式吗,其中 a 是一个数组?

c - C 编程中 cos x 和 sin x 的泰勒级数展开,不使用 math.h 且仅在 int main() 内部

python - 如何在所有操作系统中使用 pygame 播放声音?

被 gdb print ptr 与 print "%s"混淆

debugging - 如何在GDB中查看文件的完整路径?

objective-c - Xcode调试器,我不明白

在“/getc.c”eclipse c ubuntu 找不到源文件