[转载] http://www.cnblogs.com/sodu88/p/linux-error-cursesh-no-such-file-directory.html
本人所用的linux内核是linux-2.6.18_pro500,在用如下命令编译Busybox时
make menuconfig
出现fatal error: curses.h: No such file or directory错误,如下所示
scripts/kconfig/mconf.c: In function ‘exec_conf’:
scripts/kconfig/mconf.c:481:2: warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result [-Wunused-result]
pipe(pipefd);
^
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/mconf
HOSTCC scripts/kconfig/lxdialog/checklist.o
In file included from scripts/kconfig/lxdialog/checklist.c:24:0:
scripts/kconfig/lxdialog/dialog.h:31:20: fatal error: curses.h: No such file or directory
#include CURSES_LOC
^
compilation terminated.
scripts/Makefile.host:120: recipe for target 'scripts/kconfig/lxdialog/checklist.o' failed
make[2]: *** [scripts/kconfig/lxdialog/checklist.o] Error 1
/home/licg/linux_shared/tools/busybox-1.24.1/scripts/kconfig/Makefile:14: recipe for target 'menuconfig' failed
make[1]: *** [menuconfig] Error 2
Makefile:443: recipe for target 'menuconfig' failed
make: *** [menuconfig] Error 2
- 原因:出现该错误的原因是在使用menuconfig时,需要ncurses库的支持。
- 解决办法:sudo apt-get install libncurses5-dev libncursesw5-dev
再次运行make menuconfig即可进入内核配置的图像界面
- 详细参考:Linux Error: curses.h: No such file or directory Problem Solution