cannot-stat-‘-modules-builtin‘-No-such-file-or-directory

make modules_install时报错:

cp: cannot stat './modules.builtin': No such file or directory

这是因为make modules.builtin时出问题了,导致这个文件没有被编译出来。再跑一遍

make modules.builtin

看看会报什么错。我这里报的是

/bin/sh: 1: flex: not found

所以安装一下flex,重新make就好了

sudo apt install flex
make modules.builtin

再尝试make modules_install,继续报错

cannot stat 'arch/x86/crypto/aegis128-aesni.ko': No such file or directory

同样先make一下它

make arch/x86/crypto/aegis128-aesni.ko
warning: Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel

安装依赖,再make modules_install,就可以了。

注:这种情况很可能是因为make前没有make menuconfig。如果求稳的话最好把依赖装好后重新跑一遍make。

参考文献:https://lfs-support.linuxfromscratch.narkive.com/zgkC5Jzy/cannot-stat-modules-builtin-kernel-make-error

posted @ 2024-09-28 14:10  寻找繁星  阅读(21)  评论(0编辑  收藏  举报