Install Wireshark under Linux

Source: Internet
Author: User
Tags gtk

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.