下载了Linux Kernel,要make menuconfig时,出现错误:
$ make menuconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/mconf.o
<command-line>: fatal error: curses.h: No such file or directory
compilation terminated.
make[1]: *** [scripts/Makefile.host:108: scripts/kconfig/mconf.o] Error 1
make: *** [Makefile:541: menuconfig] Error 2
提示找不到curses.h文件,这个是因为没有安装ncurses库的原因。
$ apt-file search curses.h
......
libncurses-dev: /usr/include/curses.h
......
$ sudo apt install libncurses-dev
$ make menuconfig
GNU的软件可以在网站上查询:Software- GNU Project - Free Software Foundation
在列表里找到此库,点击链接,会跳跃到作者网站:
=>
简介如下:
ncurses(新curses)库是对System V Release 4.0(SVr4)及更多版本中curses进行模拟的自由软件。它使用 terminfo 格式,支持焊盘、颜色、多重高亮显示、表单字符和功能键映射,并具有 SVr4 curses 与 BSD curses 相比的所有其他增强功能。SVr4 curses成为X/Open Curses的基础。
1995 年 6 月中旬,4.4 BSD curses 的维护者宣布他认为 4.4 BSD curses 已经过时,并鼓励 BSD/OS、FreeBSD 和 NetBSD 等 unix 版本的维护者改用 ncurses。
The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0 (SVr4), and more. It uses terminfo format, supports pads and color and multiple highlights and forms characters and function-key mapping, and has all the other SVr4-curses enhancements over BSD curses. SVr4 curses became the basis of X/Open Curses.
In mid-June 1995, the maintainer of 4.4 BSD curses declared that he considered 4.4BSD curses obsolete, and encouraged the keepers of unix releases such as BSD/OS, FreeBSD and NetBSD to switch over to ncurses.
说明
所以,menuconfig操作界面,文本格式的控件,在终端显示,就需要使用ncurses库。