1、下载libpcap和tcpdump源码
http://www.tcpdump.org/
2、解压
tar xvzf libpcap-1.9.0.tar.gz
tar xvzf tcpdump-4.9.2.tar.gz
root@defbcd186d2c:/home/merlin/tcpdump# ls
libpcap-1.9.0 libpcap-1.9.0.tar.gz prefix tcpdump-4.9.2 tcpdump-4.9.2.tar.gz
3、编译
cd libpcap-1.9.0
./configure --prefix=/home/merlin/tcpdump/prefix --host=arm-linux --target=arm-linux CC=arm-linux-gcc --with-pcap=linux
make
make install
cd tcpdump-4.9.2
./configure --prefix=/home/merlin/tcpdump/prefix --host=arm-linux --target=arm-linux CC=arm-linux-gcc
make
make install
4、查看结果
root@defbcd186d2c:/home/merlin/tcpdump# ls prefix/sbin/
tcpdump tcpdump.4.9.2
5、ubuntu安装pcap
wget http://www.tcpdump.org/release/libpcap-1.9.0.tar.gz
https://blog.csdn.net/huoxingrenhdh/article/details/86721320