项目场景:
哈工大李治军操作系统实验的环境配置
问题描述:
make all的时候,报错In file included from /usr/include/linux/fs.h:10:0,
from tools/build.c:28:
/usr/include/linux/ioctl.h:4:23: fatal error: asm/ioctl.h: 没有那个文件或目录
compilation terminated.
Makefile:58: recipe for target 'tools/build' failed
make: *** [tools/build] Error 1
解决方案:
在/usr/include底下找到asm的包,我这里装的是asm-generic,写一个软链接就可以解决。代码:
// 此时的路径是在/usr/include底下,因此直接使用相对路径即可,也可以使用绝对路径。
sudo ln -s ./asm-generic/ asm
//或者
sudo ln -s /usr/include/asm-generic/ /usr/include/asm
参考链接:https://blog.csdn.net/u011018840/article/details/111034726