如何解决SUSE平台python编译问题“Failed to build these modules: _curses_panel”
2013-06-01 16:46
871 查看
常规手法编译安装:
./configure –prefix=/home/oracle/sj/python2.7
make 后提示如下:
To find the necessary bits, look in setup.py in detect_modules() for the module’s name.
Failed to build these modules: _curses_panel
第一反应肯定是遗漏装了curses_panel 需要的RPM包,查看setup.py 文件,查看curses相关发现:
# Curses support, requiring the System V version of curses, often
# provided by the ncurses library.
所以需要安装ncurses相关的RPM包,对于RPM的搜索可以在线查找http://rpmfind.net/
查看系统是否已经安装:
rpm -qa|grep ncurses
libncurses5-32bit-5.6-90.55
ncurses-devel-5.6-90.55
ncurses-devel-32bit-5.6-90.55
yast2-ncurses-pkg-2.17.16-0.1.77
libncurses5-5.6-90.55
libncurses6-32bit-5.6-90.55
libncurses6-5.6-90.55
yast2-ncurses-2.17.17-0.4.38
ncurses-utils-5.6-90.55
好了,奇怪了,都已经有了。查看make 出错日志
building ‘_curses_panel’ extension
gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/home/oracle/sj/python2.7/include -I.
-IInclude -I./Include -I/usr/local/include -I/home/oracle/sj/software/needed_python/Python-2.7.3/Include -I/home/oracle/sj/software/needed_python/
Python-2.7.3 -c /home/oracle/sj/software/needed_python/Python-2.7.3/Modules/_curses_panel.c
-o build/temp.linux-x86_64-2.7/home/oracle/sj/software/needed_python/Python-2.7.3/Modules/_curses_panel.o
/home/oracle/sj/software/needed_python/Python-2.7.3/Modules/_curses_panel.c:17:19: error: panel.h: No such file or directory
发现找不到panel.h 文件,然后怀疑查看Include是不是少文件了?
gcc 默认应该会扫描/usr/include和/usr/local/include寻找对应H文件
find /usr/include -name “panel.h”
/usr/include/ncurses6/ncurses/panel.h
/usr/include/ncurses6/ncursesw/panel.h
/usr/include/ncurses/panel.h
/usr/include/ncursesw/panel.h
OK,修改Python-2.7.3/Modules/_curses_panel.c 文件
#include /usr/include/ncurses/panel.h
重新编译即可
后发现http://bugs.python.org/issue12271已经有补丁可以修复
./configure –prefix=/home/oracle/sj/python2.7
make 后提示如下:
To find the necessary bits, look in setup.py in detect_modules() for the module’s name.
Failed to build these modules: _curses_panel
第一反应肯定是遗漏装了curses_panel 需要的RPM包,查看setup.py 文件,查看curses相关发现:
# Curses support, requiring the System V version of curses, often
# provided by the ncurses library.
所以需要安装ncurses相关的RPM包,对于RPM的搜索可以在线查找http://rpmfind.net/
查看系统是否已经安装:
rpm -qa|grep ncurses
libncurses5-32bit-5.6-90.55
ncurses-devel-5.6-90.55
ncurses-devel-32bit-5.6-90.55
yast2-ncurses-pkg-2.17.16-0.1.77
libncurses5-5.6-90.55
libncurses6-32bit-5.6-90.55
libncurses6-5.6-90.55
yast2-ncurses-2.17.17-0.4.38
ncurses-utils-5.6-90.55
好了,奇怪了,都已经有了。查看make 出错日志
building ‘_curses_panel’ extension
gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/home/oracle/sj/python2.7/include -I.
-IInclude -I./Include -I/usr/local/include -I/home/oracle/sj/software/needed_python/Python-2.7.3/Include -I/home/oracle/sj/software/needed_python/
Python-2.7.3 -c /home/oracle/sj/software/needed_python/Python-2.7.3/Modules/_curses_panel.c
-o build/temp.linux-x86_64-2.7/home/oracle/sj/software/needed_python/Python-2.7.3/Modules/_curses_panel.o
/home/oracle/sj/software/needed_python/Python-2.7.3/Modules/_curses_panel.c:17:19: error: panel.h: No such file or directory
发现找不到panel.h 文件,然后怀疑查看Include是不是少文件了?
gcc 默认应该会扫描/usr/include和/usr/local/include寻找对应H文件
find /usr/include -name “panel.h”
/usr/include/ncurses6/ncurses/panel.h
/usr/include/ncurses6/ncursesw/panel.h
/usr/include/ncurses/panel.h
/usr/include/ncursesw/panel.h
OK,修改Python-2.7.3/Modules/_curses_panel.c 文件
#include /usr/include/ncurses/panel.h
重新编译即可
后发现http://bugs.python.org/issue12271已经有补丁可以修复
相关文章推荐
- linux Failed to build these modules: _sqlite3 解决
- linux Failed to build these modules: _sqlite3 解决
- $git push origin master时如何解决failed to push some refs to git问题
- Android编译failed to find Build Tools revision 23.0.0 rc2解决
- 解决failed to find Build Tools revision xxx问题
- Win7 64位编译Python扩展解决”error: Unable to find vcvarsall.bat”问题
- IOS如何解决烦人的“clang: error: linker command failed with exit code 1 (use -v to see invocation)”问题
- Installshield 多语言安装包 和 安装序列号验证,及如何解决 Failed to set code page for Language 46 问题
- Failed to load E:\SDK\android-sdk-windows\build-tools\27.0.2\lib\dx.jar如何简单解决
- 解决Failed to create BuildConfig class问题
- Failed to load E:\SDK\android-sdk-windows\build-tools\27.0.2\lib\dx.jar如何简单解决
- Failed to load E:\SDK\android-sdk-windows\build-tools\27.0.2\lib\dx.jar如何简单解决
- MFC 调试:Build: 0 succeeded or up-to-date, 0 failed, 1 skipped--问题解决
- Python build finished, but the necessary bits to build these modules were
- [Android][Build Problems] failed to find build tools revision & failed to find target android 等问题解决
- Python build finished, but the necessary bits to build these modules were
- failed to get the task for process 1363问题解决
- 【个人笔记】anaconda安装遇到的问题:failed to creat anaconda menus的解决方法
- mysql-python模块编译问题解决
- 如何解决failed to push some refs to git