【发布时间】:2020-11-09 01:49:48
【问题描述】:
我正在运行 make 命令来构建从 here 下载的源代码。在运行make 时,它总是抛出同样的错误:
In file included from criu/cgroup.c:29:0:
criu/include/linux/mount.h:8:10: fatal error: linux/mount.h: No such file or directory
#include <linux/mount.h>
^~~~~~~~~~~~~~~
compilation terminated.
我已多次检查该文件确实存在于我正在尝试构建的源代码中。但我不明白为什么编译器找不到它?处理这些类型的错误的解决方案是什么?
编辑:此源代码在criu/include/linux/mount.h目录中包含另一个mount.h文件,在该文件中,他们使用了#include <linux/mount.h>
EDIT2:mount.h 文件不在/usr/include/linux/ 目录中,因此我将文件从主机的文件复制到 VM。现在我已经成功构建了包并安装了二进制文件,但我仍然想问一个问题是为什么mount.h 没有出现在 VM 上。
【问题讨论】:
-
你的内核版本是多少?
标签: c makefile compilation include