提问人:Rohan Aluguri 提问时间:11/9/2023 更新时间:11/11/2023 访问量:47
asm/types.h 编译 ebpf 代码时出错
asm/types.h Error during compilation of ebpf code
问:
在这里,我正在尝试编译 eBPF 代码。并使用以下命令进行编译。 命令:clang -O2 -target bpf -c your_ebpf_program.c -o your_ebpf_program.o
错误:在 my_program.c:2:/usr/include/linux/bpf.h:11:10 包含的文件中:致命错误:未找到“asm/types.h”文件#include <asm/types.h> ^~~~~~~~~~~~~1 错误。
我使用 clang 作为编译器进行编译。所有必需的库都已下载,但出现错误,指出找不到 asm/types.h。所有 linux 头文件均已更新。
答:
评论