zoukankan      html  css  js  c++  java
  • xdp (1)

    问题

    1. 安装包未安装
    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
    
    1. 编译问题
    2. 文件未找到
    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
    
    欢迎评论交流
  • 相关阅读:
    Linux中断的系统调用
    线程的概念
    C++ 虚函数表浅析
    C++虚函数工作原理
    深入浅出单实例Singleton设计模式
    《角斗士》一个帝国的史诗绝唱
    《妖猫传》大唐盛世背后那些事
    程序员之路
    职业规划
    一些重要的算法
  • 原文地址:https://www.cnblogs.com/linengier/p/11967754.html
Copyright © 2011-2022 走看看