Table of Contents
The following must be installed in order to build Wireshark:
Either make or Ninja can be used to build Wireshark; at least one of those must be installed.
To build the Developer’s Guide and the User’s Guide, Asciidoctor, Xsltproc, and DocBook must be installed.
Some features of Wireshark require additional libraries to be installed.
For Debian, and for Linux distributions based on Debian, such as Ubuntu,
the script tools/debian-setup.sh
will install the packages and
libraries required to build Wireshark. It supports the command-line
options:
--install-optional
to install additional tools and to install
libraries required for all Wireshark features;
--install-deb-deps
to install packages required to build a .deb file
for Wireshark;
--install-test-deps
to install packages required to run all tests.
For RPM-based Linux distributions such as Red Hat, Centos, Fedora, and
openSUSE, the script tools/rpm-setup.sh
will install the packages and
libraries required to build Wireshark. It supports the command-line
options:
--install-optional
to install additional tools and to install
libraries required for all Wireshark features;
--install-rpm-deps
to install packages required to build a .rpm file
for Wireshark.
For Alpine Linux, the script tools/alpine-setup.sh
will install the
packages and libraries required to build Wireshark. It supports the
--install-optional
command-line option to install additional tools and
to install libraries required for all Wireshark features.
For FreeBSD, NetBSD, OpenBSD, and DragonFly BSD, the script
tools/bsd-setup.sh
will install the packages and libraries required to
build Wireshark. It supports the --install-optional
command-line
option to install additional tools and to install libraries required for
all Wireshark features.
For macOS, you must first install Xcode. After installing Xcode, the
script tools/macos-setup.sh
will install the rest of the tools and
libraries required to build Wireshark, as well as the additional tools
required to build the documentation and the libraries required for all
Wireshark features. If you’re using Homebrew, the script
tools/macos-setup-brew.sh
will intall the same tools and libraries
from Homebrew.
If an install package is not available or you have a reason not to use it (maybe because it’s simply too old), you can install that tool from source code. The following sections will provide you with the webpage addresses where you can get these sources.
CMake builds are best done in a separate build directory, such as a
build
subdirectory of the top-level source directory. If that
directory is a subdirectory of the top-level source directory, to
generate the build files, change to the build directory and enter the
following command:
$ cmake ..
to use make as the build tool or
$ cmake -G Ninja ..
to use Ninja as the build tool. If you create the build tool in the same directory that contains the top-level Wireshark source directory, to generate the build files, change to the build directory and enter the following command:
$ cmake ../{source directory}
to use make as the build tool or
$ cmake -G Ninja ../{source directory}
to use Ninja as the build tool. {source directory}
is the name of the
top-level Wireshark source directory.
You can then run make or Ninja to build Wireshark.
To build the Wireshark User’s Guide and the Wireshark Developer’s Guide
build the all_guides
target, e.g. make all_guides
or ninja
all_guides
. Detailed information to build these guides can be found in
the file docbook\README.adoc in the Wireshark sources.
To create a source code tarball, build the dist
target.
To create an installable package after successfully building Wireshark:
deb-package
target;
rpm-package
target;
appimage
target;
dmg_package
target.