Home » Development and Build » Compilation » How to resolve : fatal error: curses.h: No such file or directory

How to resolve : fatal error: curses.h: No such file or directory

Whenever you are trying to do kernel menuconfig very first time after installation of Ubuntu, its chances that you will see the error as below,

 $ make ARCH=arm CROSS_COMPILE=arm-bcm2708-linux-gnueabi- menuconfig
  HOSTCC  scripts/kconfig/mconf.o
In file included from scripts/kconfig/mconf.c:23:0:
scripts/kconfig/lxdialog/dialog.h:38:20: fatal error: curses.h: No such file or directory
compilation terminated.
scripts/Makefile.host:124: recipe for target 'scripts/kconfig/mconf.o' failed
make[1]: *** [scripts/kconfig/mconf.o] Error 1
Makefile:546: recipe for target 'menuconfig' failed
make: *** [menuconfig] Error 2

This error is due to that your ubuntu doesn’t have “ncurses” library installed. Ncurses is required for having menu like user interface onto the terminal.
You can read more about ncurses at https://en.wikipedia.org/wiki/Ncurses

Lets identify which is the related ncurses package is available for installation,

$ sudo apt-cache search libncurses
libncurses5 - shared libraries for terminal handling
libncurses5-dbg - debugging/profiling libraries for ncurses
libncurses5-dev - developer's libraries for ncurses

Now, lets install this library as,

$ sudo apt-get install libncurses5 libncurses5-dev

You may see some different version of libncurses and use the same as you see in apt-cache search command.

Fix Minecraft Launcher Installation...
Fix Minecraft Launcher Installation Error - Make Sure You’re Connected

Leave a Comment