How do I install ncurses header files?

244,977

Solution 1

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

sudo apt-get install libncurses-dev

Solution 2

Above problem solved now. all I did was:

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

Solution 3

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/

Share:
244,977

Related videos on Youtube

Zanna
Author by

Zanna

Updated on September 18, 2022

Comments

  • Zanna
    Zanna almost 2 years

    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
    
    • Admin
      Admin over 11 years
      Try installing first libncurses5: sudo apt-get install libncurses5-dev
  • user643722
    user643722 over 9 years
    Not found. This should be ncurses-dev as in the answer below.
  • David Foerster
    David Foerster over 7 years
    @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.
  • Throw Away Account
    Throw Away Account over 6 years
    libncurses-dev works for me.
  • isaaclw
    isaaclw almost 6 years
    I know this is ubuntu, but it's still my top result for debian searches... debian uses libncurses5-dev
  • marcelocra
    marcelocra over 5 years
    I got a cannot find -lncursesw which I solved using the other answer: apt install libncurses5-dev libncursesw5-dev. Upvote it too.
  • Chirag Mittal
    Chirag Mittal over 4 years
    It says Note, selecting 'libncurses5-dev' instead of 'ncurses-dev'. But I specifically need libncurses-dev instead of libncurses5-dev.