C 致命错误:linux/mount.h:没有这样的文件或目录
我正在运行C 致命错误:linux/mount.h:没有这样的文件或目录,c,makefile,compilation,include,C,Makefile,Compilation,Include,我正在运行make命令来构建从中下载的源代码。运行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 terminat
make
命令来构建从中下载的源代码。运行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/cgroup.c:29:0:
criu/include/linux/mount.h:8:10:致命错误:linux/mount.h:没有这样的文件或目录
#包括
^~~~~~~~~~~~~~~
编译终止。
我已经多次检查该文件是否存在于我试图构建的源代码中。但我不明白为什么编译器找不到它?处理这些类型错误的解决方案是什么
EDIT:此源代码在criu/include/linux/mount.h
目录中包含另一个mount.h文件,在该文件中,他们使用了\include
EDIT2:mount.h
文件不在/usr/include/linux/
目录中,因此我将该文件从主机的one复制到VM。现在我已经成功地构建了包并安装了二进制文件,但我仍然想问一个问题,那就是为什么mount.h
没有出现在虚拟机上
我不明白为什么编译器找不到它
因为这是不应该的。应该使用
#包括“linux/mount.h”
而不是
#包括
包含项目中的文件。Hi,那么我应该直接更改它们的源代码吗?即使我更改了每个
#include
,也不会进一步产生问题?现在我想知道它是作为一个完整的软件包发布安装的,在发布之前,他们没有对它进行测试并发现相同的错误吗,mount.h
存在于/usr/include/linux/mount.h
目录中,但在我的虚拟机中,此文件不存在于该目录中。您的内核版本是什么?