问题
- 安装包未安装
fatal error: pcap/pcap.h: No such file or directory
sudo apt-get install libpcap-dev
bpf_load.c:13:10: fatal error: libelf.h: No such file or directory
#include <libelf.h>
^~~~~~~~~~
compilation terminated.
Makefile:177: recipe for target 'bpf_load.o' failed
make: *** [bpf_load.o] Error 1
sudo apt install libelf-dev
- 编译问题
- 文件未找到
I have a question,when I run this :clang -O2 -target bpf -c dropper.c -o dropper.o
I got a error with:
In file included from dropper.c:1:
In file included from /usr/include/linux/bpf.h:11:
/usr/include/linux/types.h:5:10: fatal error: ‘asm/types.h’ file not found
#include <asm/types.h>
^~~~~~~~~~~~~
1 error generated.
解决
Check if you have `/usr/include/asm-generic`
and if type.h is in asm-generic
I copied asm-generic and rename to asm.
And It works.
fatal error: sys/cdefs.h: No such file or directory
sudo apt-get purge libc6-dev
sudo apt-get install libc6-dev
sudo apt-get install libc6-dev-i386