如何安装ncurses头文件?


58

我试图配置内核,但出现以下错误。有人可以告诉我该怎么做吗?

root@nitr-desktop:/usr/src/linux# make menuconfig
 *** 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[1]: *** [scripts/kconfig/dochecklxdialog] Error 1
make: *** [menuconfig] Error 2

7
尝试安装第一个libncurses5:sudo apt-get install libncurses5-dev
微笑

Answers:


97

打开终端,并使用以下命令安装libncurses-dev:

sudo apt-get install libncurses-dev

1
未找到。这应该是ncurses-dev,如下面的答案所示。
user643722 2014年

@ user643722:有什么问题?apt-cache show libncurses-devyields N: Can't select versions from package 'libncurses-dev' as it is purely virtual,这意味着我可以按照答案的说明进行安装。
David Foerster

3
libncurses-dev为我工作。
扔掉帐户

我知道这是ubuntu,但这仍然是我进行debian搜索的最佳结果... debian使用libncurses5-dev
isaaclw

我得到了cannot find -lncursesw使用其他答案解决的问题apt install libncurses5-dev libncursesw5-dev。也支持它。
marcelocra

23

以上问题现已解决。我所做的就是:

sudo apt-get update
sudo apt-get install ncurses-dev

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.