无法使用python支持安装GDB [英] Unable to install GDB with python support
问题描述
事情是,我想在我的GDB安装中提供python支持。当我跑时
./ configure --with-python
make
在GDB源文件目录中,但是,make退出并显示以下信息:
检查是否使用python ... yes
检查python ...(缓存)/home/tools/tools/../bin/64//python
检查python2.7 ... no
configure:error:python is missing or unavailableable
请注意,返回的信息可能表明make程序试图在/home/tools/tools/../bin/64//python目录中查找python安装,但是不是我帐户的默认python安装,我设置了$ PATH变量来使python命令指向我自己的Python安装,它位于主目录下。
为什么会这样?任何人都可以帮忙吗?千分之一谢谢。
PS。有一件事我不确定,因为我只想让一些脚本自动运行在.gdbinit文件中,这看起来像一些python脚本。是否支持这个脚本等同于让GDB能够调试python脚本?解析方案
我有同样的问题。我正在使用Python 2.7.10 - Anaconda 2.3.0(安装在非标准位置)和GDB-7.11。事实证明,在 gdb-7.11 /
中有多个自动配置。当我检查 gdb-7.11 / gdb / config.cache
时,出现错误,因为找不到 python2.7
库。因此,当在 gdb-7.11
中运行顶级自动配置时,解决方案是 export LDFLAGS
>否则在 gdb-7.11 / gdb
中的自动配置将不知道在哪里找到python2.7库。
EG
make distclean
cd gdb /
make distclean
cd ../
export LDFLAGS = -L / path / to / nonstandard / python / lib /; ./configure --prefix = / path / to / home / directory / gdb-7.11 / --with-python
注意:在这种情况下,最好同时清理顶层和gdb配置。清理顶级配置不会清理gdb / configure。这给了我一些悲伤。
The thing is, I want to have python support in my GDB installation. When I ran
./configure --with-python
with
make
in the GDB source file directory, however, the "make" exited with the following information:
checking whether to use python... yes
checking for python... (cached) /home/tools/tools/../bin/64//python
checking for python2.7... no
configure: error: python is missing or unusable"
Note that the returned information possible indicates that the "make" program is trying to find a python intallation in "/home/tools/tools/../bin/64//python" directory, which, however is not the default python installation of my account. I've set the $PATH variable to make the "python" command pointing to a python installation of my own, which resides under home directory.
Why is this? Can anyone help? A thousand thanks.
PS. There's one thing I'm not sure, since I only want to have some script automatically run in the ".gdbinit" file, which seems like some python script. Does supporting this script equal to making GDB able to debug python script??
I had this same problem. I am using Python 2.7.10 - Anaconda 2.3.0 (installed in a non-standard location), and GDB-7.11. It turns out that within gdb-7.11/
there are multiple autoconfigs. When I inspected gdb-7.11/gdb/config.cache
, there was an error because it could not find python2.7
library. So the solution is to export LDFLAGS
, when running the top level autoconfig in gdb-7.11
otherwise the autoconfig in gdb-7.11/gdb
will not know where to find the python2.7 library.
E.G.
make distclean
cd gdb/
make distclean
cd ../
export LDFLAGS=-L/path/to/nonstandard/python/lib/; ./configure --prefix=/path/to/home/directory/gdb-7.11/ --with-python
NOTE : In this situation, it is best to clean both the top level and the gdb configures. Cleaning the top level configure will not clean the gdb/ configure. This gave me some grief.
这篇关于无法使用python支持安装GDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!