(笔记)Linux内核编译: scripts/kconfig/lxdialog/dialog.h:38:20: fatal error: curses.h: No such file or directory

 

一、问题描述

在编译Linux内核时,使用make menuconfig报错:

scripts/kconfig/lxdialog/dialog.h:38:20: fatal error: curses.h: No such file or director

tdyizhen1314@ubuntu:~/tronlong/AM57X/kernel/linux-4.9.65$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 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

 

二、解决方法

安装工具:sudo apt-get install libncurses5-dev

tdyizhen1314@ubuntu:~/tronlong/AM57X/kernel/linux-4.9.65$ sudo apt-get install libncurses5-dev
[sudo] password for dade: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libtinfo-dev
Suggested packages:
  ncurses-doc
The following NEW packages will be installed:
  libncurses5-dev libtinfo-dev
0 upgraded, 2 newly installed, 0 to remove and 48 not upgraded.
Need to get 252 kB of archives.
After this operation, 1,461 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libtinfo-dev amd64 6.0+20160213-1ubuntu1 [77.4 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libncurses5-dev amd64 6.0+20160213-1ubuntu1 [175 kB]
Fetched 252 kB in 5s (46.8 kB/s)          
Selecting previously unselected package libtinfo-dev:amd64.
(Reading database ... 220730 files and directories currently installed.)
Preparing to unpack .../libtinfo-dev_6.0+20160213-1ubuntu1_amd64.deb ...
Unpacking libtinfo-dev:amd64 (6.0+20160213-1ubuntu1) ...
Selecting previously unselected package libncurses5-dev:amd64.
Preparing to unpack .../libncurses5-dev_6.0+20160213-1ubuntu1_amd64.deb ...
Unpacking libncurses5-dev:amd64 (6.0+20160213-1ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libtinfo-dev:amd64 (6.0+20160213-1ubuntu1) ...
Setting up libncurses5-dev:amd64 (6.0+20160213-1ubuntu1) ...
tdyizhen1314@ubuntu:~/tronlong/AM57X/kernel/linux-4.9.65$ make ARCH=a

 

安装完成后,即可使用make menuconfig。

tdyizhen1314@ubuntu:~/tronlong/AM57X/kernel/linux-4.9.65$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
  HOSTCC  scripts/kconfig/lxdialog/util.o
  HOSTCC  scripts/kconfig/lxdialog/inputbox.o
  HOSTCC  scripts/kconfig/lxdialog/textbox.o
  HOSTCC  scripts/kconfig/lxdialog/yesno.o
  HOSTCC  scripts/kconfig/lxdialog/menubox.o
  HOSTLD  scripts/kconfig/mconf
scripts/kconfig/mconf  Kconfig


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

 

posted on 2023-08-10 13:22  tdyizhen1314  阅读(276)  评论(0编辑  收藏  举报

导航