zl程序教程

您现在的位置是:首页 >  系统

当前栏目

编译u-boot或Linux内核菜单报错,/bin/sh: 1: bison: not found

LinuxBoot内核 报错 not 编译 菜单 found
2023-09-11 14:15:46 时间

报错

本文编译的是u-boot2021
在编译内核或uboot时,出现/bin/sh: 1: bison: not found错误。

imaginemiracle@:u-boot-master$ make menuconfig
  HOSTCC  scripts/basic/fixdep
  UPD     scripts/kconfig/.mconf-cfg
  HOSTCC  scripts/kconfig/mconf.o
  YACC    scripts/kconfig/zconf.tab.c
/bin/sh: 1: bison: not found
make[1]: *** [scripts/Makefile.lib:222: scripts/kconfig/zconf.tab.c] Error 127
make: *** [Makefile:564: menuconfig] Error 2

解决

该错误是由于缺少一些相关库文件导致,安装上即可正常编译。
安装命令:

sudo apt install bison flex