如何解决SUSE平台python编译问题“Failed to build these modules: _curses_panel”
来源:互联网 发布:淘宝电子面单怎么关联 编辑:程序博客网 时间:2024/05/17 23:33
常规手法编译安装:
./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已经有补丁可以修复
- 如何解决SUSE平台python编译问题“Failed to build these modules: _curses_panel”
- linux Failed to build these modules: _sqlite3 解决
- Python build finished, but the necessary bits to build these modules were
- Python build finished, but the necessary bits to build these modules were
- 解决failed to find Build Tools revision xxx问题
- Gradle BUILD FAILED 如何解决?
- Android编译failed to find Build Tools revision 23.0.0 rc2解决
- ubuntu 12.10 显卡问题和解决 Failed to build fglrx-8.961 with DKMS
- 解决安装rails时出现 ERROR: Failed to build gem native extension. 的问题
- 在SUSE上安装build Forge出错, 解决方法:xinetd的启动问题 start restart failed
- 解决failed to build gem native extension on windows 7
- [解决]Error:failed to find Build Tools revision
- failed to find Build Tools revision错误的解决
- python 如何引用modules
- Failed to build DependencyGraph
- Failed to load E:\SDK\android-sdk-windows\build-tools\27.0.2\lib\dx.jar如何简单解决
- kbuild: Documentation - how to build external modules
- $git push origin master时如何解决failed to push some refs to git问题
- 你要相信自己
- 如何在Android Quick Search Box中添加自己的app,按照我的意愿去Search。
- SVG 坐标转换
- LA 3177 Beijing Guards
- RGB/YUV格式解析
- 如何解决SUSE平台python编译问题“Failed to build these modules: _curses_panel”
- pid_t 类型
- hdu 4465 Candy - 概率 log 组合数
- 管理我的数据 — GDBM
- 虚基类解决二义性?
- 初识—Html VS Web窗体
- 如何不让EditText不获得焦点
- vim
- MOD 之"Hello World"