既然要安装抓包工具wireshark,那么我们首先必须得了解下它是什么,干什么的?
我只是知识的搬用工:http://baike.baidu.com/link?url=1bxmqMKKN_IItxScckpL9Pru3lqVZdWWQawHngf-jzvG4gBE4BYjZ4VHsSeEYw4DmHUsim1nTc5T2smo-UR9Mq
实战操作:
win主机的下一步下一步!!这里说下linux下的安装方法~
系统平台信息:
Linux hostname 2.6.32-504.el6.x86_64 #1 SMP Tue Sep 16 01:56:35 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
安装包信息:
wireshark-1.12.8.tar.bz2
libpcap-1.7.4.tar.gz
下载地址(拿来用之or自己百度之):
Wireshark 网址http://sourceforge.net/projects/wireshark/
libpcap 网址http://www.tcpdump.org/
----------------------
安装步骤:
1、验证安装包信息
# rpm -qa | grep libpcap
libpcap-1.4.0-1.20130826git2dbcaa1.el6.x86_64 ---显示已经安装
--------------
2、libpcap未安装先需要安装,在安装wireshark:
#tar -zxcf libpcap-1.7.4.tar.gz
#cd libpcap-xxx
# ./configure
#make
------------------------安装日志---------
[
root@XXX libpcap-1.7.4]#
./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for inline... inline
checking for __attribute__... yes
checking whether __attribute__((unused)) can be used without warnings... yes
checking whether __attribute__((format)) can be used without warnings... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/bitypes.h usability... yes
checking sys/bitypes.h presence... yes
checking for sys/bitypes.h... yes
checking for int8_t... yes
checking for u_int8_t... yes
checking for int16_t... yes
checking for u_int16_t... yes
checking for int32_t... yes
checking for u_int32_t... yes
checking for int64_t... yes
checking for u_int64_t... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for _LARGEFILE_SOURCE value needed for large files... no
checking sys/ioccom.h usability... no
checking sys/ioccom.h presence... no
checking for sys/ioccom.h... no
checking sys/sockio.h usability... no
checking sys/sockio.h presence... no
checking for sys/sockio.h... no
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking paths.h usability... yes
checking paths.h presence... yes
checking for paths.h... yes
checking linux/types.h usability... yes
checking linux/types.h presence... yes
checking for linux/types.h... yes
checking linux/if_packet.h usability... yes
checking linux/if_packet.h presence... yes
checking for linux/if_packet.h... yes
checking netpacket/packet.h usability... yes
checking netpacket/packet.h presence... yes
checking for netpacket/packet.h... yes
checking netpacket/if_packet.h usability... no
checking netpacket/if_packet.h presence... no
checking for netpacket/if_packet.h... no
checking for net/pfvar.h... no
checking for netinet/if_ether.h... yes
checking for linux/sockios.h... yes
checking for linux/if_bonding.h... yes
checking for ANSI ioctl definitions... yes
checking for strerror... yes
checking for strlcpy... no
checking for vsnprintf... yes
checking for snprintf... yes
checking for library containing gethostbyname... none required
checking for library containing socket... none required
checking for library containing putmsg... none required
checking for ether_hostton... yes
checking whether ether_hostton is declared... no
checking netinet/ether.h usability... yes
checking netinet/ether.h presence... yes
checking for netinet/ether.h... yes
checking whether ether_hostton is declared... yes
checking if --disable-protochain option is specified... enabled
checking packet capture type... linux
checking for linux/wireless.h... yes
checking for nl_socket_alloc in -lnl-3... no
checking for nl_socket_alloc in -lnl... no
checking for nl_handle_alloc in -lnl... no
checking for linux/ethtool.h... yes
checking if if_packet.h has tpacket_stats defined... yes
checking if tpacket_auxdata struct has tp_vlan_tci member... yes
checking for getifaddrs... yes
checking ifaddrs.h usability... yes
checking ifaddrs.h presence... yes
checking for ifaddrs.h... yes
checking for socklen_t... yes
checking for getaddrinfo... yes
checking whether to build optimizer debugging code... no
checking whether to build parser debugging code... no
checking whether we have DAG API headers... no (/usr/local/include)
checking whether we have the DAG API... no
checking whether we have Septel API... no
checking whether we have Myricom Sniffer API... no (/opt/snf)
checking for flex... flex
checking for flex 2.4 or higher... yes
checking for bison... bison
checking for ranlib... ranlib
checking for ar... ar
checking whether ln -s works... yes
checking if sockaddr struct has the sa_len member... no
checking if sockaddr_storage struct exists... yes
checking if dl_hp_ppa_info_t struct has dl_module_id_1 member... no
checking if unaligned accesses fail... no
checking for USB sniffing support... yes
configure: Device for USB sniffing is /dev/usbmon
checking linux/compiler.h usability... no
checking linux/compiler.h presence... no
checking for linux/compiler.h... no
checking linux/usbdevice_fs.h usability... yes
checking linux/usbdevice_fs.h presence... yes
checking for linux/usbdevice_fs.h... yes
checking if usbdevfs_ctrltransfer struct has bRequestType member... yes
checking whether the platform could support netfilter sniffing... yes
checking whether we can compile the netfilter support... yes
checking bluetooth/bluetooth.h usability... no
checking bluetooth/bluetooth.h presence... no
checking for bluetooth/bluetooth.h... no
configure: Bluetooth sniffing is not supported; install bluez-lib devel to enable it
checking libusb-1.0/libusb.h usability... no
checking libusb-1.0/libusb.h presence... no
checking for libusb-1.0/libusb.h... no
configure: canusb sniffing is not supported; install libusb1.0 lib devel to enable it
checking for linux/can.h... yes
configure: CAN sniffing is supported
checking for pkg-config... pkg-config
checking for D-Bus... yes
checking whether the D-Bus library defines dbus_connection_read_write... yes
checking linux/net_tstamp.h usability... yes
checking linux/net_tstamp.h presence... yes
checking for linux/net_tstamp.h... yes
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating Makefile
config.status: creating pcap-filter.manmisc
config.status: creating pcap-linktype.manmisc
config.status: creating pcap-tstamp.manmisc
config.status: creating pcap-savefile.manfile
config.status: creating pcap.3pcap
config.status: creating pcap_compile.3pcap
config.status: creating pcap_datalink.3pcap
config.status: creating pcap_dump_open.3pcap
config.status: creating pcap_get_tstamp_precision.3pcap
config.status: creating pcap_list_datalinks.3pcap
config.status: creating pcap_list_tstamp_types.3pcap
config.status: creating pcap_open_dead.3pcap
config.status: creating pcap_open_offline.3pcap
config.status: creating pcap_set_tstamp_precision.3pcap
config.status: creating pcap_set_tstamp_type.3pcap
config.status: creating config.h
config.status: executing default-1 commands
[
root@XXX libpcap-1.7.4]#
---------------------------------
[
root@XXX libpcap-1.7.4]#
make
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./pcap-linux.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./pcap-usb-linux.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./pcap-can-linux.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./pcap-netfilter-linux.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./pcap-dbus.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./fad-getad.c
if grep GIT ./VERSION >/dev/null; then \
read ver <./VERSION; \
echo $ver | tr -d '\012'; \
date +_%Y_%m_%d; \
else \
cat ./VERSION; \
fi | sed -e 's/.*/static const char pcap_version_string[] = "libpcap version &";/' > version.h
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./pcap.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./inet.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./gencode.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./optimize.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./nametoaddr.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./etherent.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./savefile.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./sf-pcap.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./sf-pcap-ng.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./pcap-common.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./bpf_image.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./bpf_dump.c
./runlex.sh flex -Ppcap_ -oscanner.c scanner.l
mv scanner.c scanner.c.bottom
cat ./scanner.c.top scanner.c.bottom > scanner.c
bison -y -p pcap_ -d grammar.y
conflicts: 38 shift/reduce
mv y.tab.c grammar.c
mv y.tab.h tokdefs.h
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c scanner.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -Dyylval=pcap_lval -c grammar.c
rm -f bpf_filter.c
ln -s ./bpf/net/bpf_filter.c bpf_filter.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c bpf_filter.c
if grep GIT ./VERSION >/dev/null; then \
read ver <./VERSION; \
echo $ver | tr -d '\012'; \
date +_%Y_%m_%d; \
else \
cat ./VERSION; \
fi | sed -e 's/.*/char pcap_version[] = "&";/' > version.c
gcc -fpic -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c version.c
ar rc libpcap.a pcap-linux.o pcap-usb-linux.o pcap-can-linux.o pcap-netfilter-linux.o pcap-dbus.o fad-getad.o pcap.o inet.o gencode.o optimize.o nametoaddr.o etherent.o savefile.o sf-pcap.o sf-pcap-ng.o pcap-common.o bpf_image.o bpf_dump.o scanner.o grammar.o bpf_filter.o version.o
ranlib libpcap.a
VER=`cat ./VERSION`; \
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' ./VERSION`; \
gcc -shared -Wl,-soname,libpcap.so.$MAJOR_VER \
-o libpcap.so.$VER pcap-linux.o pcap-usb-linux.o pcap-can-linux.o pcap-netfilter-linux.o pcap-dbus.o fad-getad.o pcap.o inet.o gencode.o optimize.o nametoaddr.o etherent.o savefile.o sf-pcap.o sf-pcap-ng.o pcap-common.o bpf_image.o bpf_dump.o scanner.o grammar.o bpf_filter.o version.o -L/lib64 -ldbus-1 -lpthread -lrt
./config.status --file=pcap-config.tmp:./pcap-config.in
config.status: creating pcap-config.tmp
mv pcap-config.tmp pcap-config
chmod a+x pcap-config
[
root@XXX libpcap-1.7.4]#
[
root@XXX libpcap-1.7.4]#
make install
VER=`cat ./VERSION`; \
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' ./VERSION`; \
gcc -shared -Wl,-soname,libpcap.so.$MAJOR_VER \
-o libpcap.so.$VER pcap-linux.o pcap-usb-linux.o pcap-can-linux.o pcap-netfilter-linux.o pcap-dbus.o fad-getad.o pcap.o inet.o gencode.o optimize.o nametoaddr.o etherent.o savefile.o sf-pcap.o sf-pcap-ng.o pcap-common.o bpf_image.o bpf_dump.o scanner.o grammar.o bpf_filter.o version.o -L/lib64 -ldbus-1 -lpthread -lrt
[ -d /usr/local/lib ] || \
(mkdir -p /usr/local/lib; chmod 755 /usr/local/lib)
VER=`cat ./VERSION`; \
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' ./VERSION`; \
/usr/bin/install -c libpcap.so.$VER /usr/local/lib/libpcap.so.$VER; \
ln -sf libpcap.so.$VER /usr/local/lib/libpcap.so.$MAJOR_VER; \
ln -sf libpcap.so.$MAJOR_VER /usr/local/lib/libpcap.so
#
# Most platforms have separate suffixes for shared and
# archive libraries, so we install both.
#
[ -d /usr/local/lib ] || \
(mkdir -p /usr/local/lib; chmod 755 /usr/local/lib)
/usr/bin/install -c -m 644 libpcap.a /usr/local/lib/libpcap.a
ranlib /usr/local/lib/libpcap.a
[ -d /usr/local/lib ] || \
(mkdir -p /usr/local/lib; chmod 755 /usr/local/lib)
[ -d /usr/local/include ] || \
(mkdir -p /usr/local/include; chmod 755 /usr/local/include)
[ -d /usr/local/include/pcap ] || \
(mkdir -p /usr/local/include/pcap; chmod 755 /usr/local/include/pcap)
[ -d /usr/local/share/man/man1 ] || \
(mkdir -p /usr/local/share/man/man1; chmod 755 /usr/local/share/man/man1)
[ -d /usr/local/share/man/man3 ] || \
(mkdir -p /usr/local/share/man/man3; chmod 755 /usr/local/share/man/man3)
[ -d /usr/local/share/man/man5 ] || \
(mkdir -p /usr/local/share/man/man5; chmod 755 /usr/local/share/man/man5)
[ -d /usr/local/share/man/man7 ] || \
(mkdir -p /usr/local/share/man/man7; chmod 755 /usr/local/share/man/man7)
for i in pcap.h pcap-bpf.h pcap-namedb.h pcap/bpf.h pcap/bluetooth.h pcap/ipnet.h pcap/namedb.h pcap/nflog.h pcap/pcap.h pcap/sll.h pcap/vlan.h pcap/usb.h; do \
/usr/bin/install -c -m 644 ./$i \
/usr/local/include/$i; done
[ -d /usr/local/bin ] || \
(mkdir -p /usr/local/bin; chmod 755 /usr/local/bin)
/usr/bin/install -c pcap-config /usr/local/bin/pcap-config
for i in pcap-config.1; do \
/usr/bin/install -c -m 644 ./$i \
/usr/local/share/man/man1/$i; done
for i in pcap_activate.3pcap pcap_breakloop.3pcap pcap_can_set_rfmon.3pcap pcap_close.3pcap pcap_create.3pcap pcap_datalink_name_to_val.3pcap pcap_datalink_val_to_name.3pcap pcap_dump.3pcap pcap_dump_close.3pcap pcap_dump_file.3pcap pcap_dump_flush.3pcap pcap_dump_ftell.3pcap pcap_file.3pcap pcap_fileno.3pcap pcap_findalldevs.3pcap pcap_freecode.3pcap pcap_get_selectable_fd.3pcap pcap_geterr.3pcap pcap_inject.3pcap pcap_is_swapped.3pcap pcap_lib_version.3pcap pcap_lookupdev.3pcap pcap_lookupnet.3pcap pcap_loop.3pcap pcap_major_version.3pcap pcap_next_ex.3pcap pcap_offline_filter.3pcap pcap_open_live.3pcap pcap_set_buffer_size.3pcap pcap_set_datalink.3pcap pcap_set_immediate_mode.3pcap pcap_set_promisc.3pcap pcap_set_rfmon.3pcap pcap_set_snaplen.3pcap pcap_set_timeout.3pcap pcap_setdirection.3pcap pcap_setfilter.3pcap pcap_setnonblock.3pcap pcap_snapshot.3pcap pcap_stats.3pcap pcap_statustostr.3pcap pcap_strerror.3pcap pcap_tstamp_type_name_to_val.3pcap pcap_tstamp_type_val_to_name.3pcap; do \
/usr/bin/install -c -m 644 ./$i \
/usr/local/share/man/man3/$i; done
for i in pcap.3pcap pcap_compile.3pcap pcap_datalink.3pcap pcap_dump_open.3pcap pcap_get_tstamp_precision.3pcap pcap_list_datalinks.3pcap pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap pcap_open_offline.3pcap pcap_set_tstamp_precision.3pcap pcap_set_tstamp_type.3pcap; do \
/usr/bin/install -c -m 644 $i \
/usr/local/share/man/man3/$i; done
(cd /usr/local/share/man/man3 && \
rm -f pcap_datalink_val_to_description.3pcap && \
ln -s pcap_datalink_val_to_name.3pcap \
pcap_datalink_val_to_description.3pcap && \
rm -f pcap_dump_fopen.3pcap && \
ln -s pcap_dump_open.3pcap pcap_dump_fopen.3pcap && \
rm -f pcap_freealldevs.3pcap && \
ln -s pcap_findalldevs.3pcap pcap_freealldevs.3pcap && \
rm -f pcap_perror.3pcap && \
ln -s pcap_geterr.3pcap pcap_perror.3pcap && \
rm -f pcap_sendpacket.3pcap && \
ln -s pcap_inject.3pcap pcap_sendpacket.3pcap && \
rm -f pcap_free_datalinks.3pcap && \
ln -s pcap_list_datalinks.3pcap pcap_free_datalinks.3pcap && \
rm -f pcap_free_tstamp_types.3pcap && \
ln -s pcap_list_tstamp_types.3pcap pcap_free_tstamp_types.3pcap && \
rm -f pcap_dispatch.3pcap && \
ln -s pcap_loop.3pcap pcap_dispatch.3pcap && \
rm -f pcap_minor_version.3pcap && \
ln -s pcap_major_version.3pcap pcap_minor_version.3pcap && \
rm -f pcap_next.3pcap && \
ln -s pcap_next_ex.3pcap pcap_next.3pcap && \
rm -f pcap_open_dead_with_tstamp_precision.3pcap && \
ln -s pcap_open_dead.3pcap \
pcap_open_dead_with_tstamp_precision.3pcap && \
rm -f pcap_open_offline_with_tstamp_precision.3pcap && \
ln -s pcap_open_offline.3pcap pcap_open_offline_with_tstamp_precision.3pcap && \
rm -f pcap_fopen_offline.3pcap && \
ln -s pcap_open_offline.3pcap pcap_fopen_offline.3pcap && \
rm -f pcap_fopen_offline_with_tstamp_precision.3pcap && \
ln -s pcap_open_offline.3pcap pcap_fopen_offline_with_tstamp_precision.3pcap && \
rm -f pcap_tstamp_type_val_to_description.3pcap && \
ln -s pcap_tstamp_type_val_to_name.3pcap pcap_tstamp_type_val_to_description.3pcap && \
rm -f pcap_getnonblock.3pcap && \
ln -s pcap_setnonblock.3pcap pcap_getnonblock.3pcap)
for i in pcap-savefile.manfile.in; do \
/usr/bin/install -c -m 644 `echo $i | sed 's/.manfile.in/.manfile/'` \
/usr/local/share/man/man5/`echo $i | sed 's/.manfile.in/.5/'`; done
for i in pcap-filter.manmisc.in pcap-linktype.manmisc.in pcap-tstamp.manmisc.in; do \
/usr/bin/install -c -m 644 `echo $i | sed 's/.manmisc.in/.manmisc/'` \
/usr/local/share/man/man7/`echo $i | sed 's/.manmisc.in/.7/'`; done
[
root@XXXlibpcap-1.7.4]#
3、安装wireshark:
#bunzip2 wireshark-1.12.8.tar.bz2
#tar xvf wireshark-1.12.8.tar
#cd wireshark-1.12.8
-----------------------安装日志--------------------------
[ root@XXXwireshark-1.12.8]# ./configure --with-gtk2 --默认安装报错情况下
GnuTLS found, enabling SSL decryption
checking for libgcrypt-config... /usr/bin/libgcrypt-config
checking for LIBGCRYPT - version >= 1.1.92... yes
libgcrypt found, enabling ipsec decryption
checking whether to use libnl for various network interface purposes... yes
checking for LIBNL3... no
checking for LIBNL2... no
checking for LIBNL1... no
checking if nl80211.h is new enough... yes
checking for NL80211_SET_CHANNEL... yes
checking for libsmi >= 2... not found
checking for a2x... no
checking for a2x... no
checking for elinks... /usr/bin/elinks
checking for elinks... yes
checking for fop... /usr/bin/fop
checking for fop... yes
checking for lynx... no
checking for lynx... no
checking for w3m... no
checking for w3m... no
checking for xmllint... /usr/bin/xmllint
checking for xmllint... yes
checking for xsltproc... /usr/bin/xsltproc
checking for xsltproc... yes
checking for desktop-file-install... /usr/bin/desktop-file-install
checking for pkgproto... no
checking for pkgmk... no
checking for pkgtrans... no
checking for rpm... yes
checking to see if we can redefine _topdir... yes
checking for dpkg-buildpackage... no
checking for xcodebuild... no
checking for hdiutil... no
checking for bless... no
checking whether the compiler fails when given an unknown warning option... yes
checking whether the compiler fails when given an warning option not supported for C++... no, adding -Werror
checking whether we can add -Wall -W to CFLAGS... yes
checking whether we can add -Wall -W to CXXFLAGS... yes
checking whether we can add -Wextra to CFLAGS... yes
checking whether we can add -Wextra to CXXFLAGS... yes
checking whether we can add -Wdeclaration-after-statement to CFLAGS... yes
checking whether we can add -Wendif-labels to CFLAGS... yes
checking whether we can add -Wendif-labels to CXXFLAGS... yes
checking whether we can add -Wpointer-arith to CFLAGS... yes
checking whether we can add -Wpointer-arith to CXXFLAGS... yes
checking whether we can add -Wno-pointer-sign to CFLAGS... yes
checking whether we can add -Warray-bounds to CFLAGS... yes
checking whether we can add -Warray-bounds to CXXFLAGS... yes
checking whether we can add -Wformat-security to CFLAGS... yes
checking whether we can add -Wformat-security to CXXFLAGS... yes
checking whether we can add -fwrapv to CFLAGS... yes
checking whether we can add -fwrapv to CXXFLAGS... yes
checking whether we can add -fno-strict-overflow to CFLAGS... yes
checking whether we can add -fno-strict-overflow to CXXFLAGS... yes
checking whether we can add -fno-delete-null-pointer-checks to CFLAGS... yes
checking whether we can add -fno-delete-null-pointer-checks to CXXFLAGS... yes
checking whether we can add -Wold-style-definition to CFLAGS... yes
checking whether we can add -Wshorten-64-to-32 to CFLAGS... no
checking whether we can add -Wstrict-prototypes to CFLAGS... yes
checking whether we can add -Wjump-misses-init to CFLAGS... no
checking whether we can add -Wvla to CFLAGS... yes
checking whether we can add -Wvla to CXXFLAGS... yes
checking whether we can add -Waddress to CFLAGS... yes
checking whether we can add -Waddress to CXXFLAGS... yes
checking whether we can add -Wattributes to CFLAGS... yes
checking whether we can add -Wattributes to CXXFLAGS... yes
checking whether we can add -Wdiv-by-zero to CFLAGS... yes
checking whether we can add -Wdiv-by-zero to CXXFLAGS... yes
checking whether we can add -Wignored-qualifiers to CFLAGS... yes
checking whether we can add -Wignored-qualifiers to CXXFLAGS... yes
checking whether we can add -Wpragmas to CFLAGS... yes
checking whether we can add -Wpragmas to CXXFLAGS... yes
checking whether we can add -Wno-overlength-strings to CFLAGS... yes
checking whether we can add -Wno-overlength-strings to CXXFLAGS... yes
checking whether we can add -Wwrite-strings to CFLAGS... yes
checking whether we can add -Wwrite-strings to CXXFLAGS... yes
checking whether we can add -Wno-long-long to CFLAGS... yes
checking whether we can add -Wno-long-long to CXXFLAGS... yes
checking whether we can add -Wc++-compat to CFLAGS... yes
checking whether we can add -Wheader-guard to CFLAGS... no
checking whether we can add -Wheader-guard to CXXFLAGS... no
checking whether we can add -Wshadow to CFLAGS... yes
checking whether -Wshadow warns about variables in function declarations shadowing other variables... no
checking whether we can add -Wlogical-op to CFLAGS... yes
checking whether -Wlogical-op generates warnings from strchr()... yes
checking whether we can add -fexcess-precision=fast to CFLAGS... no
checking whether we can add -fexcess-precision=fast to CXXFLAGS... no
checking whether we can add -fvisibility=hidden to CFLAGS... yes
checking whether we can add -fvisibility=hidden to CXXFLAGS... yes
checking whether we can add -Wl,--as-needed to LDFLAGS... yes
checking whether we can add -fPIE to CFLAGS... yes
checking whether we can add -fPIE to CXXFLAGS... yes
checking whether we can add -fPIE -pie to LDFLAGS... yes
checking whether -D_FORTIFY_SOURCE=... can be used (without generating a warning)... yes
checking whether we should treat compiler warnings as errors... no
checking for platform-specific compiler flags... none needed
checking for platform-specific linker flags... none needed
checking whether make supports nested variables... (cached) yes
checking whether to use /usr/local for headers and libraries... yes
checking for sed... (cached) /bin/sed
checking for GNU sed as first sed in PATH... yes
checking if profile builds must be generated... no
checking for pkg-config... /usr/bin/pkg-config
checking for GTK+ - version >= 2.12.0 and < 3.0... yes (version 2.24.23)
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for GLIB - version >= 2.16.0... yes (version 2.28.8)
checking for uic... /usr/lib64/qt-3.3/bin/uic
checking for moc... /usr/lib64/qt-3.3/bin/moc
checking whether GLib supports loadable modules... yes
checking for dladdr... no
checking for dladdr... (cached) no
checking whether GLib supports POSIX/XSI thousands grouping... yes
checking whether to use OS X integration functions... yes
checking for gtkosx_application_set_menu_bar in -lgtkmacintegration... no
checking for gtk_mac_menu_set_menu_bar in -lGtk... no
checking for gtk_mac_menu_set_menu_bar in -lgtkmacintegration... no
checking for gethostbyname... yes
checking for connect... yes
checking whether to use libpcap for packet capture... yes
checking for pcap-config... /usr/local/bin/pcap-config
checking for broken pcap-config... no
checking pcap.h usability... yes
checking pcap.h presence... yes
checking for pcap.h... yes
checking for pcap_open_dead... yes
checking for pcap_freecode... yes
checking whether pcap_breakloop is present... yes
checking whether pcap_findalldevs is present and usable... yes
checking for pcap_datalink_val_to_name... yes
checking for pcap_datalink_name_to_val... yes
checking for pcap_datalink_val_to_description... yes
checking for pcap_list_datalinks... yes
checking for pcap_set_datalink... yes
checking for pcap_lib_version... yes
checking for pcap_get_selectable_fd... yes
checking for pcap_free_datalinks... yes
checking for pcap_create... yes
checking for bpf_image... yes
checking whether to include airpcap support... yes
checking whether to build dumpcap... yes
checking whether to build rawshark... yes
checking whether to use libpcap remote capturing feature... no
checking whether to use zlib for gzip compression and decompression... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for inflatePrime... yes
checking for inflatePrime missing when linking with X11... no
checking whether to use liblua for the Lua scripting plugin... yes
checking Lua version... Lua 5.2
checking lua.h usability... no
checking lua.h presence... no
checking for lua.h... no
checking lua5.2/lua.h usability... no
checking lua5.2/lua.h presence... no
checking for lua5.2/lua.h... no
checking lua5.2/lualib.h usability... no
checking lua5.2/lualib.h presence... no
checking for lua5.2/lualib.h... no
checking lua5.2/lauxlib.h usability... no
checking lua5.2/lauxlib.h presence... no
checking for lua5.2/lauxlib.h... no
checking lualib.h usability... no
checking lualib.h presence... no
checking for lualib.h... no
checking for lua5.2/lua.h... (cached) no
checking for lua5.2/lualib.h... (cached) no
checking for lua5.2/lauxlib.h... (cached) no
checking lauxlib.h usability... no
checking lauxlib.h presence... no
checking for lauxlib.h... no
checking for lua5.2/lua.h... (cached) no
checking for lua5.2/lualib.h... (cached) no
checking for lua5.2/lauxlib.h... (cached) no
liblua not found - disabling support for the lua scripting plugin
checking whether to use libportaudio for the rtp_player... yes
checking portaudio.h usability... no
checking portaudio.h presence... no
checking for portaudio.h... no
libportaudio not found - disabling support for the rtp_player
checking whether to enable ipv6 name resolution if available... yes
checking ipv6 stack type... "linux-glibc, inet6"
checking for setcap... /usr/sbin/setcap
checking whether to install dumpcap with cap_net_admin and cap_net_raw capabilities... no
checking whether to install dumpcap setuid... no
checking for setresuid... yes
checking for setresgid... yes
checking whether to use the libcap capabilities library... yes
checking for cap_set_flag in -lcap... no
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking for inttypes.h... (cached) yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for unistd.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/sockio.h usability... no
checking sys/sockio.h presence... no
checking for sys/sockio.h... no
checking for sys/stat.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for sys/types.h... (cached) yes
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking arpa/nameser.h usability... yes
checking arpa/nameser.h presence... yes
checking for arpa/nameser.h... yes
checking for linux/sockios.h... yes
checking for linux/if_bonding.h... yes
checking whether to use SSL library... no
checking whether to use Kerberos library... yes
checking for krb5-config... /usr/bin/krb5-config
checking krb5.h usability... yes
checking krb5.h presence... yes
checking for krb5.h... yes
checking whether the Kerberos library is Heimdal or MIT... MIT
checking whether MIT includes krb5_kt_resolve... yes
checking whether krb5.h defines KEYTYPE_ARCFOUR_56... no
checking whether to use the c-ares library if available... yes
checking for ares_init in -lcares... no
checking whether to use the GNU ADNS library if available... yes
checking for adns_init in -ladns... no
checking whether to use the GeoIP IP address mapping library if available... yes
checking for GeoIP_new in -lGeoIP... no
checking whether to use the Python interpreter for scripting... no
checking for tm_zone in struct tm... yes
checking for st_flags in struct stat... no
checking for sa_len in struct sockaddr... no
checking whether byte ordering is bigendian... no
checking whether gcc needs -traditional... no
checking for getopt_long... yes
checking whether optreset is defined... no
checking for strncasecmp... yes
checking for mkstemp... yes
checking for mkdtemp... yes
checking for library containing inet_aton... none required
checking for library containing inet_pton... none required
checking for broken inet_pton... ok
checking for library containing inet_ntop... none required
checking for inet_ntop prototype... yes
checking for strptime... yes
checking for getprotobynumber... yes
checking for gethostbyname2... yes
checking for issetugid... no
checking for mmap... yes
checking for mprotect... yes
checking for sysconf... yes
checking for SBC... no
checking whether we need memory allocations to be 8-byte aligned... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doxygen.cfg
config.status: creating asn1/Makefile
config.status: creating asn1/acp133/Makefile
config.status: creating asn1/acse/Makefile
config.status: creating asn1/ansi_map/Makefile
config.status: creating asn1/ansi_tcap/Makefile
config.status: creating asn1/atn-cm/Makefile
config.status: creating asn1/atn-cpdlc/Makefile
config.status: creating asn1/atn-ulcs/Makefile
config.status: creating asn1/c1222/Makefile
config.status: creating asn1/camel/Makefile
config.status: creating asn1/cdt/Makefile
config.status: creating asn1/charging_ase/Makefile
config.status: creating asn1/cmip/Makefile
config.status: creating asn1/cmp/Makefile
config.status: creating asn1/crmf/Makefile
config.status: creating asn1/cms/Makefile
config.status: creating asn1/credssp/Makefile
config.status: creating asn1/dap/Makefile
config.status: creating asn1/disp/Makefile
config.status: creating asn1/dop/Makefile
config.status: creating asn1/dsp/Makefile
config.status: creating asn1/ess/Makefile
config.status: creating asn1/ftam/Makefile
config.status: creating asn1/gnm/Makefile
config.status: creating asn1/goose/Makefile
config.status: creating asn1/gprscdr/Makefile
config.status: creating asn1/gsm_map/Makefile
config.status: creating asn1/h225/Makefile
config.status: creating asn1/h235/Makefile
config.status: creating asn1/h245/Makefile
config.status: creating asn1/h248/Makefile
config.status: creating asn1/h282/Makefile
config.status: creating asn1/h283/Makefile
config.status: creating asn1/h323/Makefile
config.status: creating asn1/h450/Makefile
config.status: creating asn1/h450-ros/Makefile
config.status: creating asn1/h460/Makefile
config.status: creating asn1/h501/Makefile
config.status: creating asn1/HI2Operations/Makefile
config.status: creating asn1/hnbap/Makefile
config.status: creating asn1/idmp/Makefile
config.status: creating asn1/ilp/Makefile
config.status: creating asn1/inap/Makefile
config.status: creating asn1/isdn-sup/Makefile
config.status: creating asn1/kerberos/Makefile
config.status: creating asn1/lcsap/Makefile
config.status: creating asn1/ldap/Makefile
config.status: creating asn1/logotypecertextn/Makefile
config.status: creating asn1/lpp/Makefile
config.status: creating asn1/lppa/Makefile
config.status: creating asn1/lppe/Makefile
config.status: creating asn1/lte-rrc/Makefile
config.status: creating asn1/m3ap/Makefile
config.status: creating asn1/mms/Makefile
config.status: creating asn1/mpeg-audio/Makefile
config.status: creating asn1/mpeg-pes/Makefile
config.status: creating asn1/nbap/Makefile
config.status: creating asn1/ns_cert_exts/Makefile
config.status: creating asn1/novell_pkis/Makefile
config.status: creating asn1/ocsp/Makefile
config.status: creating asn1/p1/Makefile
config.status: creating asn1/p22/Makefile
config.status: creating asn1/p7/Makefile
config.status: creating asn1/p772/Makefile
config.status: creating asn1/pcap/Makefile
config.status: creating asn1/pkcs1/Makefile
config.status: creating asn1/pkcs12/Makefile
config.status: creating asn1/pkinit/Makefile
config.status: creating asn1/pkixac/Makefile
config.status: creating asn1/pkix1explicit/Makefile
config.status: creating asn1/pkix1implicit/Makefile
config.status: creating asn1/pkixproxy/Makefile
config.status: creating asn1/pkixqualified/Makefile
config.status: creating asn1/pkixtsp/Makefile
config.status: creating asn1/pres/Makefile
config.status: creating asn1/q932/Makefile
config.status: creating asn1/q932-ros/Makefile
config.status: creating asn1/qsig/Makefile
config.status: creating asn1/ranap/Makefile
config.status: creating asn1/rnsap/Makefile
config.status: creating asn1/ros/Makefile
config.status: creating asn1/rrc/Makefile
config.status: creating asn1/rrlp/Makefile
config.status: creating asn1/rtse/Makefile
config.status: creating asn1/rua/Makefile
config.status: creating asn1/s1ap/Makefile
config.status: creating asn1/sabp/Makefile
config.status: creating asn1/sbc-ap/Makefile
config.status: creating asn1/smrse/Makefile
config.status: creating asn1/snmp/Makefile
config.status: creating asn1/spnego/Makefile
config.status: creating asn1/sv/Makefile
config.status: creating asn1/t124/Makefile
config.status: creating asn1/t125/Makefile
config.status: creating asn1/t38/Makefile
config.status: creating asn1/tcap/Makefile
config.status: creating asn1/tetra/Makefile
config.status: creating asn1/ulp/Makefile
config.status: creating asn1/wlancertextn/Makefile
config.status: creating asn1/x2ap/Makefile
config.status: creating asn1/x509af/Makefile
config.status: creating asn1/x509ce/Makefile
config.status: creating asn1/x509if/Makefile
config.status: creating asn1/x509sat/Makefile
config.status: creating asn1/x721/Makefile
config.status: creating doc/Makefile
config.status: creating docbook/Makefile
config.status: creating epan/Makefile
config.status: creating epan/crypt/Makefile
config.status: creating epan/doxygen.cfg
config.status: creating epan/dfilter/Makefile
config.status: creating epan/dissectors/Makefile
config.status: creating epan/dissectors/dcerpc/Makefile
config.status: creating epan/dissectors/pidl/Makefile
config.status: creating epan/ftypes/Makefile
config.status: creating epan/nghttp2/Makefile
config.status: creating epan/wmem/Makefile
config.status: creating epan/wslua/Makefile
config.status: creating epan/wspython/Makefile
config.status: creating filetap/Makefile
config.status: creating codecs/Makefile
config.status: creating ui/Makefile
config.status: creating ui/doxygen.cfg
config.status: creating ui/gtk/Makefile
config.status: creating ui/gtk/doxygen.cfg
config.status: creating ui/cli/Makefile
config.status: creating ui/qt/Makefile
config.status: creating ui/qt/doxygen.cfg
config.status: creating help/Makefile
config.status: creating packaging/Makefile
config.status: creating packaging/macosx/Info.plist
config.status: creating packaging/macosx/Makefile
config.status: creating packaging/macosx/osx-dmg.sh
config.status: creating packaging/macosx/Wireshark_package.pmdoc/index.xml
config.status: creating packaging/nsis/Makefile
config.status: creating packaging/rpm/Makefile
config.status: creating packaging/rpm/SPECS/Makefile
config.status: creating packaging/rpm/SPECS/wireshark.spec
config.status: creating packaging/svr4/Makefile
config.status: creating packaging/svr4/checkinstall
config.status: creating packaging/svr4/pkginfo
config.status: creating plugins/Makefile
config.status: creating plugins/docsis/Makefile
config.status: creating plugins/ethercat/Makefile
config.status: creating plugins/gryphon/Makefile
config.status: creating plugins/irda/Makefile
config.status: creating plugins/m2m/Makefile
config.status: creating plugins/mate/Makefile
config.status: creating plugins/opcua/Makefile
config.status: creating plugins/profinet/Makefile
config.status: creating plugins/stats_tree/Makefile
config.status: creating plugins/unistim/Makefile
config.status: creating plugins/wimax/Makefile
config.status: creating plugins/wimaxasncp/Makefile
config.status: creating plugins/wimaxmacphy/Makefile
config.status: creating tools/Makefile
config.status: creating tools/lemon/Makefile
config.status: creating wiretap/Makefile
config.status: creating wsutil/Makefile
config.status: creating echld/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
The Wireshark package has been configured with the following options.
Build wireshark (Gtk+) : yes (with GTK+ 2)
Build wireshark-qt : no
Build tshark : yes
Build capinfos : yes
Build captype : yes
Build editcap : yes
Build dumpcap : yes
Build mergecap : yes
Build reordercap : yes
Build text2pcap : yes
Build randpkt : yes
Build dftest : yes
Build rawshark : yes
Save files as pcap-ng by default : yes
Install dumpcap with capabilities : no
Install dumpcap setuid : no
Use dumpcap group : (none)
Use plugins : yes
Use Lua library : no
Use Python binding : no
Build rtp_player : no
Build profile binaries : no
Use pcap library : yes
Use zlib library : yes
Use kerberos library : yes (MIT)
Use c-ares library : no
Use GNU ADNS library : no
Use SMI MIB library : no
Use GNU crypto library : yes
Use SSL crypto library : no
Use IPv6 name resolution : yes
Use gnutls library : yes
Use POSIX capabilities library : no
Use GeoIP library : no
Use nl library : no
Use SBC codec library : no
[
root@XXX wireshark-1.12.8]#
4、本地打开图形界面
#export DISPLAY=ip:0.0
本地先打开Xmanager先
wireshark&
在 shell 中输入 wireshark& 即可运行图形化的 wireshark 工具
5、进行操作了:
6、补充:
(1)安装包缺失报错
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?
(2)GTK版本问题报错:
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for GTK+ - version >= 3.0.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
configure: error: GTK+ 3 is not available
解决方法在正文中!
------------
Author:GS-Utrapower-ZYR Time:20151025------------------------------ |
滴水汇聚溪流 平凡可铸伟大 `````````````