1、下载源码
wget https://www.tcpdump.org/release/tcpdump-4.99.1.tar.gz
wget https://www.tcpdump.org/release/libpcap-1.10.1.tar.gz
tar -xvzf ./tcpdump-4.99.1.tar.gz
tar -xvzf ./libpcap-1.10.1.tar.gz
2、配置编译器环境变量
export PATH=/home/rkdev/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/:$PATH
3、编译libpcap
./configure --host=arm-linux CC=arm-linux-gnueabihf-gcc --prefix=/home/rkdev/install/libpcap
make
make install
4、编译tcpdump
./configure --host=arm-linux CC=arm-linux-gnueabihf-gcc CFLAGS="-I/home/rkdev/install/libpcap/include/ -L/home/rkdev/install/libpcap/lib/" --prefix=/home/rkdev/install/tcpdump
make
make install
- 本文固定链接: http://www.letg.top/?p=92
- 转载请注明: ubosm 于 点滴分享 发表