Ubuntu中编译linux内核后使用make menuconfig报错的解决办法

第一次在Ubuntu中编译完内核使用make menuconfig时出现如下错误

topeet@ubuntu:~/iMX6UL/linux-2.6-imx-rel_imx_4.1.15_1.2.0_ga$ 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
compilation terminated.
scripts/Makefile.host:108: recipe for target 'scripts/kconfig/mconf.o' failed
make[1]: *** [scripts/kconfig/mconf.o] Error 1
Makefile:541: recipe for target 'menuconfig' failed
make: *** [menuconfig] Error 2

参考https://www.youranshare.com/push/topics/softuse/305.html的解决办法安装库文件

topeet@ubuntu:~/iMX6UL/linux-2.6-imx-rel_imx_4.1.15_1.2.0_ga$ sudo apt-get install libncurses5-dev

安装完成后重新使用make menuconfig又报如下错误

topeet@ubuntu:~/iMX6UL/linux-2.6-imx-rel_imx_4.1.15_1.2.0_ga$ make menuconfig   HOSTCC  scripts/kconfig/mconf.o
scripts/kconfig/mconf.c:1047:1: fatal error: opening dependency file scripts/kconfig/.mconf.o.d: Permission denied
 }
 ^
compilation terminated.
scripts/Makefile.host:108: recipe for target 'scripts/kconfig/mconf.o' failed
make[1]: *** [scripts/kconfig/mconf.o] Error 1
Makefile:541: recipe for target 'menuconfig' failed
make: *** [menuconfig] Error 2

经老师指点,在make menuconfig前加sudo后问题解决。

topeet@ubuntu:~/iMX6UL/linux-2.6-imx-rel_imx_4.1.15_1.2.0_ga$ sudo make menuconfig 

Ubuntu中编译linux内核后使用make menuconfig报错的解决办法_第1张图片

说明:库文件libncurses5为普通库文件,无源码,libncurses5-dev为开发者模式库文件。

你可能感兴趣的:(linux环境搭建,linux,ubuntu)