Sunday, March 1, 2015

Fatal error: curses.h: No such file or directory while configuring Kernel Source

While working on Kernel source, during configuring Kernel options, we  may need to use "make menuconfig" command.

We may end up with following error.

 mrtechpathi@mrtechpathi:~/Study/linux-source/linux-2.6$ make 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  
  #include CURSES_LOC  
           ^  
 compilation terminated.  
 make[1]: *** [scripts/kconfig/mconf.o] Error 1  
 make: *** [menuconfig] Error 2  

To overcome this, execute below steps

1. $ sudo apt-get update
2. $ sudo apt-get install libncurses5-dev
3. $ make menuconfig -> Works fine now !!!!

Following are my system configurations.
 No LSB modules are available.  
 Distributor ID:     Ubuntu  
 Description:     Ubuntu 14.04 LTS  
 Release:     14.04  
 Codename:     trusty  

Let me know if it worked for you :)

4 comments:

  1. yes it works. thanks for the tip

    ReplyDelete
  2. Thanks Ajeya. Glad that it helped you.

    ReplyDelete
  3. Worked for me too, thank you!

    ReplyDelete
  4. Thanks a lot..I had been trying different alternatives like make defconfig, make xconfig, etc. But this one helped a lot, solved my issue..Thanks a lot..You're great :-D

    ReplyDelete