报错信息
make[2]: *** 没有规则可制作目标“arch/x86/tools/relocs_32.c”,由“arch/x86/tools/relocs_32.o” 需求。 停止。
make[1]: *** [arch/x86/Makefile:211:archscripts] 错误 2
解决办法:
makefile文件里面使用M=代替SUBDIRS=
使用ubuntu系统20.04
参考网址:
no rule to process a target relocs_32.c
遇到的其他问题:
1./bin/sh: 1: flex: not found
green@green-virtual-machine:~/work$ sudo make
make -C /lib/modules/5.11.0-43-generic/build SUBDIRS=/home/green/work modules
make[1]: 进入目录“/usr/src/linux-headers-5.11.0-43-generic”
SYNC include/config/auto.conf.cmd
LEX scripts/kconfig/lexer.lex.c
/bin/sh: 1: flex: not found
make[3]: *** [scripts/Makefile.host:9:scripts/kconfig/lexer.lex.c] 错误 127
make[2]: *** [Makefile:629:syncconfig] 错误 2
make[1]: *** [Makefile:738:include/config/auto.conf.cmd] 错误 2
make[1]: 离开目录“/usr/src/linux-headers-5.11.0-43-generic”
make: *** [Makefile:6:all] 错误 2
解决办法:
sudo apt-get install flex
sudo apt-get install bison
参考网址: