- 安装c编译所需包
sudo apt-get install build-essential
- 安装libpcap的前置
sudo apt-get install flex
sudo apt-get install bison
- 下载libpcap和tcpdump并解压,官网地址:http://www.tcpdump.org/, 解压命令:
tar -zxvf <your tar file>
- 安装libpcap
cd <libpcap path># 进入解压之后的libpcap文件目录
./configure
sudo make
sudo make install
- 安装tcpdump
cd <tcpdump path> # 进入解压之后的tcpdump文件目录
./configure
sudo make
sudo make install