Linux内核编译报错/bin/sh: 1: bison: not found recipe for target ‘scriptskconfigparser.tab.h‘ failed

Linux内核编译报错recipe for target ‘scriptskconfigparser.tab.h’ failed

错误信息
QQ截图20221107180416.png

/bin/sh: 1: bison: not found
scripts/Makefile.host:17: recipe for target 'scripts/kconfig/parser.tab.h' failed
make[1]: *** [scripts/kconfig/parser.tab.h] Error 127
Makefile:589: recipe for target 'menuconfig' failed
make: *** [menuconfig] Error 2

解决方法

按错误提示来
安装bison

sudo apt-get install bison

重新编译测试
QQ截图20221107180731.png
ok解决