ubuntu apt源中已经没有了libbpf-dev的源。只能源代码安装
1 安装clang和llvm
默认ubuntu安装的clang10和llvm10
sudo apt install clang
sudo apt install llvm
sudo apt install pkg-config
sudo apt install m4
sudo apt install libelf-dev
sudo apt install libpcap-dev
出现
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
需要安装
sudo apt-get install -y gcc-multilib
2 编译libbpf
git clone
cd src
make
sudo make install
阅读(4122) | 评论(0) | 转发(0) |