Skip to content
serxoz edited this page Sep 21, 2021 · 12 revisions

Installing dependencies

Debian/Ubuntu

Install required packages from repository:

# apt-get update
# apt-get install git autoconf automake gcc make \
  libncursesw5-dev libncurses5-dev libpcap-dev libssl-dev libpcre3-dev

CentOS/Fedora

Install required packages from repository:

# yum install ncurses-devel make libpcap-devel pcre-devel \
    openssl-devel git gcc autoconf automake

ArchLinux

Install required packages from repository:

# pacman -Sy ncurses libpcap openssl git gcc sed make

Mac OS X

Install MacPorts:

Install main dependencies:

port install pkgconfig
port install libpcap
port install ncurses

Install optional dependencies:

port install pcre
port install openssl

Ncurses library on Mac OS X has wide character support (unicode) by default, there is no ncursesw library.

To enable support for PCRE and SSL/TLS: in order to find the include files and libraries installed by macports, before executing any command for compiling from sources, do:

export CFLAGS=$(pkg-config --cflags libpcre openssl)
export LDFLAGS=$(pkg-config --libs libpcre openssl)

Whenever an upgrade is performed, do the exports commands every time before running configure.

NetBSD

Install required packages from repository:

pkgin install autoconf automake

Configure command must be run with CFLAGS AND LDFLAGS:

CFLAGS="-D_NETBSD_SOURCE -D_XOPEN_SOURCE=600 -I/usr/pkg/include/ncursesw -I/usr/pkg/include" \
LDFLAGS="-L/usr/pkg/lib -lpcre -lssl -lcrypto -Wl,-R/usr/pkg/lib -lncursesw" \
./configure --with-openssl --with-gnutls --enable-unicode --with-pcre

Compiling the sources

Clone the github repository and check that all prerequisites are fulfilled.

$ git clone https://github.com/irontec/sngrep
$ cd sngrep
$ ./bootstrap.sh
$ ./configure
$ make
# make install    # (as root)