配置gobject内省时找不到Python头文件。
我下载了tar的目的是:
gobject-introspection-1.34.2
命令:---
gobject-introspection-1.34.2$ LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:$LD_LIBRARY_PATH ./configure --disable-static
错误:--
checking for python script directory... ${prefix}/lib/python2.7/dist-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/dist-packages
checking for headers required to compile python extensions... not found
configure: error: Python headers not found
我该如何解决这个错误,请建议?
编译器正在查找Python头文件。在Linux发行版上,这通常通过安装
python-dev
或类似的包来解决。在hood下,您应该能够通过gcc的-I
选项指定include目录。在centos上,如果在共享目录中有一个独立版本的python-2.7.12,请注意python config实际上是名为python2.7-config
对python也是一样……它可能被称为python2.7
就我个人而言,要解决建筑gobject I:
cd进入python-2.7.12的bin目录并创建了符号链接
ln-s python2.7Python ln-s python2.7-config python配置
希望这有帮助
也许你需要在Ubuntu或Debian中为Python安装一个类似Python dev的开发包?命令是
相关问题 更多 >
编程相关推荐