Skip to content
Daniel-Constantin Mierla edited this page Jul 8, 2016 · 12 revisions

Installing dependencies

Debian/Ubuntu

Install required packages from repository:

# apt-get update
# apt-get install git autoconf automake gcc make \
  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.

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)