83

I was trying to configure the kernel and I got the following error. Can somebody please tell me what I should do?

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
Zanna
  • 72,471

3 Answers3

124

Open up your terminal and install libncurses-dev by using this command:

sudo apt-get install libncurses-dev
David Foerster
  • 36,900
  • 56
  • 98
  • 152
shahid
  • 1,249
  • 1
  • 8
  • 3
  • 1
    Not found. This should be ncurses-dev as in the answer below. – user643722 Dec 17 '14 at 09:00
  • @user643722: What's the problem? apt-cache show libncurses-dev yields N: Can't select versions from package 'libncurses-dev' as it is purely virtual, which means I could install it like the answer says. – David Foerster Oct 04 '16 at 16:46
  • 3
    libncurses-dev works for me. – Throw Away Account Feb 03 '18 at 21:00
  • I know this is ubuntu, but it's still my top result for debian searches... debian uses libncurses5-dev – isaaclw Aug 14 '18 at 15:21
  • I got a cannot find -lncursesw which I solved using the other answer: apt install libncurses5-dev libncursesw5-dev. Upvote it too. – marcelocra Feb 11 '19 at 23:51
  • On Ubuntu, libncurses-dev is all that is needed. It is meta package referencing libncurses(w)X-dev (where X is version number). libncurses5-dev and libncursesw5-dev packages are defined as transitional packages that were at the time question was asked referenced by libncurses-dev, as of now updated to reference latest version '6'. Sematical difference between sudo apt install libncurses5-dev libncursesw5-dev and sudo apt install libncurses-dev is that the first option asks specifically for version '5' of the ncurses while the later option asks for the 'latest' version. – Petr Lazecky Nov 03 '24 at 14:43
23

Above problem solved now. all I did was:

sudo apt-get update
sudo apt-get install ncurses-dev
Parto
  • 15,685
  • It says Note, selecting 'libncurses5-dev' instead of 'ncurses-dev'. But I specifically need libncurses-dev instead of libncurses5-dev. – Chirag Mittal Nov 24 '19 at 09:21
14

Tested on Ubuntu 17.04

You should install libncurses5-dev and libncursesw5-dev:

apt install libncurses5-dev libncursesw5-dev

References: https://www.cyberciti.biz/faq/linux-install-ncurses-library-headers-on-debian-ubuntu-centos-fedora/