/bin/sh: 1: flex: not found

/workspace/linux (master) $ make bzImage
  SYNC    include/config/auto.conf.cmd
  HOSTCC  scripts/kconfig/conf.o
  LEX     scripts/kconfig/lexer.lex.c
/bin/sh: 1: flex: not found
make[3]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127
make[2]: *** [Makefile:689: syncconfig] Error 2
make[1]: *** [/workspace/linux/Makefile:790: include/config/auto.conf.cmd] Error 2
make[1]: *** [include/config/auto.conf.cmd] Deleting file 'include/generated/autoconf.h'
make: *** [Makefile:240: __sub-make] Error 2

Resolution

sudo apt update

sudo apt install flex

Last updated