龙空技术网

make menuconfig提示:fatal error curses.h No such file or directory

小田BSP 99

前言:

现在姐妹们对“ubuntu config failed”可能比较讲究,朋友们都想要了解一些“ubuntu config failed”的相关知识。那么小编同时在网摘上收集了一些对于“ubuntu config failed””的相关文章,希望兄弟们能喜欢,兄弟们快快来学习一下吧!

前段时间Ubuntu 18.04系统挂了,重装系统后,一直没有安装编译环境,记录下编译时遇到的一些问题。

1、问题描述

make menuconfig时报如下错误:

root@ubuntu:/home/run/code/linux-4.9.y# make ARCH=arm CROSS_COMPILE=aarch64-xx-linux-gcc menuconfig  HOSTCC  scripts/kconfig/mconf.o<command-line>:0:12: fatal error: curses.h: No such file or directory    ## 错误位置compilation terminated.scripts/Makefile.host:124: recipe for target 'scripts/kconfig/mconf.o' failedmake[1]: *** [scripts/kconfig/mconf.o] Error 1Makefile:546: recipe for target 'menuconfig' failedmake: *** [menuconfig] Error 2

2、解决方法

安装软件包libncurses5-dev

root@ubuntu:/home/run/code/linux-4.9.y# apt-get install libncurses5-dev Reading package lists... DoneBuilding dependency tree       Reading state information... Done...Setting up libtinfo-dev:amd64 (6.1-1ubuntu1.18.04) ...Setting up libncurses5-dev:amd64 (6.1-1ubuntu1.18.04) ...Processing triggers for man-db (2.8.3-2ubuntu0.1) ...root@ubuntu:/home/run/code/linux-4.9.y# 

重新执行make menuconfig,可以成功进入配置页面,如下:

root@ubuntu:/home/run/code/linux-4.9.y# make ARCH=arm CROSS_COMPILE=aarch64-xx-linux-gcc 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/mconfscripts/kconfig/mconf  Kconfig .config - Linux/arm 4.9.37 Kernel Configuration

3、注意事项

在嵌入式系统中,执行make menuconfig时,需要指定处理器架构ARCH和交叉编译工具链CROSS_COMPILE

标签: #ubuntu config failed