系统环境:
[root@RedHat6 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.0 (Santiago)
所需软件:
wireshark
http://www.wireshark.org/download.html

libpcap

http://www.tcpdump.org/

安装配置:

  1. # tar jxvf wireshark-1.4.2.tar.bz2 /usr/local/src/ 
  2.  
  3. # cd wireshark-1.4.2 
  4.  
  5. # ./configure --prefix=/usr/local/wireshark-1.4.2  --with-pcap=/usr/local/libpcap-1.1.1/ 
  6. # make && make install

安装遇到的问题:

checking for pcap-config... no
checking for extraneous pcap header directories... not found
checking pcap.h usability... no
checking pcap.h presence... no
checking for pcap.h... no
configure: error: Header file pcap.h not found; if you installed libpcap
from source, did you also do "make install-incl", and if you installed a
binary package of libpcap, is there also a developer's package of libpcap,
and did you also install that package?

解决:下载安装libpcap软件包,在编译的时候添加--with-pcap选项即可。

效果如下图所示:

备注:wireshark需要root权限才能运行

RHEL下编译wireshark源码_Wireshark抓包工具 Wiresh