没有规则可制作目标“arch/x86/tools/relocs_32.c”

报错信息

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
参考网址:

linux报错:/bin/sh: 1: flex: not found …

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容