编译Linux内核出现错误:make vexpress_defconfig & menuconfig

在编译Linux内核时出现错误:

wit@ubuntu:/home/linux-5.4.14# make vexpress_defconfig
  LEX     scripts/kconfig/lexer.lex.c
/bin/sh: 1: flex: not found
make[1]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127
make: *** [Makefile:568: vexpress_defconfig] Error 2
 

wit@ubuntu:/home/linux-5.4.14# make menuconfig
  UPD     scripts/kconfig/mconf-cfg
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
  HOSTCC  scripts/kconfig/lxdialog/inputbox.o
  HOSTCC  scripts/kconfig/lxdialog/menubox.o
  HOSTCC  scripts/kconfig/lxdialog/textbox.o
  HOSTCC  scripts/kconfig/lxdialog/util.o
  HOSTCC  scripts/kconfig/lxdialog/yesno.o
  LEX     scripts/kconfig/lexer.lex.c
/bin/sh: 1: flex: not found
make[1]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127
make: *** [Makefile:568: menuconfig] Error 2

解决方法:分别安装词法解析器flex,和语法解析器bison:

# apt install flex
# pt install bison


 

你可能感兴趣的:(QEMU)