1, 环境: Ubuntu10.04 + libpcap-1.4.0.tar.gz
2,Libpcap下载: 官方地址-http://www.tcpdump.org/#latest-release 即可下载最新版本的libpcap。
3,解压libpcap-1.4.0.tar.gz: tar -zxvf libpcap-1.4.0.tar.gz
4,配置生成makefile文件:cd到libpcap解压目录libpcap-1.4.0, 执行 ./configure。执行到这一步可能会遇到缺少flex包的问题:
configure: error: Your operating system's lex is insufficient to compile
libpcap. flex is a lex replacement that has many advantages, including
being able to compile libpcap. For more information, see
http://www.gnu.org/software/flex/flex.html .
解决办法:安装flex包---- sudo apt-get install flex
5,make
可能会遇到ya