天天看點

[已解決]'make menuconfig' requires the ncurses libraries

1. 錯誤描述

新搭建的

build server

,編譯

kernel

時報錯:

'make menuconfig' requires the ncurses libraries.
           

詳細的錯誤資訊如下:

[email protected]:/opt/linux/3.14-1.14/rootfs$ make menuconfig-linux
make -C linux ARCH=arm menuconfig
make[1]: Entering directory `/opt/linux/3.14-1.14/linux'
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
*** 
 *** Install ncurses (ncurses-devel) and try again.
*** 
make[2]: *** [scripts/kconfig/dochecklxdialog] Error 1
make[1]: *** [menuconfig] Error 2
make[1]: Leaving directory `/opt/linux/3.14-1.14/linux'
make: *** [menuconfig-linux] Error 2
           

2. 解決辦法

這個是新安裝系統後編譯

kernel

時最常見的錯誤。

為什麼會出錯呢?這跟

ncurses

的用途有關。

維基百科上是這麼介紹的:

https://en.wikipedia.org/wiki/Ncurses

ncurses (new curses) is a programming library providing an application programming interface (API) that allows the programmer to write text-based user interfaces in a terminal-independent manner. It is a toolkit for developing “GUI-like” application software that runs under a terminal emulator. It also optimizes screen changes, in order to reduce the latency experienced when using remote shells.

簡單說來,就是

ncurses

在字元終端(

terminal

)提供了類

GUI

的使用者接口,如下:

[已解決]'make menuconfig' requires the ncurses libraries

Ubuntu 14.04

上安裝

libncurses5-dev

包得以解決:

繼續閱讀