Install Wireshark under Linux
Wireshark relies on libpcap, so if Libpcap is not installed in the system, install it as well
First, download the source code
source files
wireshark-x.x.x.tar.gz Wireshark Installation source files
libpcap-x.x.x.tar.gz Libpcap Installation source files
Wireshark URL http://sourceforge.net/projects/wireshark/
Libpcap URL http://www.tcpdump.org/
Second, installation
Install Libpcap: The purpose of this installation is to provide Wireshark with the required pcap.h
Tar xvf libpcap-xxx.tar.gz
CD libpcap-xxx
./configure
Make
If this step is wrong, then according to the error, see the relevant environment variable path is correct, such as to use the Bison file, is to use/usr/bin/bison, and if in the environment variable path/usr/bin comparison, then the actual use of the other directory bison, So to do is to put/usr/bin in the path variable mentioned earlier
Make install
Installing Wireshark
Tar xvf wireshark-xxx.tar.gz
CD wireshark-xxx
./configure
If Libpcap is not installed prior to installing Wireshark, the Wireshark installation may be performed./configure times Wrong "can't find Pcap.h", the solution is to install Libpcap source package, and then install Wireshark
Make
If the error "./gtk/main_menubar.c:3644: Cannot find function g_strcmp0 ()"
Here the g_strcmp0 should be a function in a library file that already exists, but it may not exist in the system, or the library does not have this function
Workaround:
The 613 line of the./PLUGINS/ASN1/PACKET-ASN1.C has the definition of function g_strcmp (), note that it is not g_strcmp0 ()
Copy the definition of this function to a location beginning in the./gtk/main_menubar.c and change its name to G_strcmp0 ()
static int
G_strcmp0 (Gconstpointer A, gconstpointer b)
{
if (a = = 0) A = empty;
if (b = = 0) b = empty;
Return strcmp (A, b);
}
At the same time, the./plugins/asn1/packet-asn1.c 463 line of static const char empty[] = ""; Also copied to the starting position of the./gtk/main_menubar.c, because the g_strcmp0 is going to use empty
Make install
Third, the operation
Enter wireshark& in the shell to run the graphical Wireshark tool
Install Wireshark under Linux