1. Install Dependencies

Required Libraries

First, install the following dependencies using your favorite package manager or from source code:

Then, install wandio as follows:

$ mkdir ~/src
$ cd ~/src/
$ curl -LO https://github.com/LibtraceTeam/wandio/archive/refs/tags/4.2.4-1.tar.gz
$ tar zxf wandio-4.2.3.tar.gz
$ cd wandio-4.2.3/
$ ./configure
$ make
# make install

Note: download timeout failures could happen if using earlier versions of wandio (<1.0.5)

Note: Ensure that the last lines from configure show a Yes result for at least zlib, bz2, and libcurl like the following:

configure: WANDIO version 4.2.3
configure: Compiled with compressed file (zlib) support: Yes
configure: Compiled with compressed file (bz2) support: Yes
configure: Compiled with compressed file (lzo write only) support: No
configure: Compiled with compressed file (lzma) support: No
configure: Compiled with http read (libcurl) support: Yes

Note: If you do not want to install system-wide, then you can specify an installation directory (/INSTALL/PATH) as follows:

$ ./configure --prefix=/INSTALL/PATH

Then, depending on your OS, you may need to set LD_LIBRRAY_PATH as follows:

$ export LD_LIBRARY_PATH="/INSTALL/PATH/lib:$LD_LIBRARY_PATH"

If required libraries are not in the system library paths, specify their paths when running configure as follows:

$ ./configure CPPFLAGS='-I/path/to/deps/include' LDFLAGS='-L/path/to/deps/lib'

You may test that wandio works by running $ wandiocat http://google.com

Optional Libraries

  • sqlite3, required for the SQLite data interface. Add --with-sqlite option during configure to enable sqlite support.

2. Download and install BGPStream

$ cd ~/src/
$ curl -LO https://github.com/CAIDA/libbgpstream/releases/download/v2.2.0/libbgpstream-2.2.0.tar.gz
$ tar zxf libbgpstream-2.2.0.tar.gz
$ cd libbgpstream-2.2.0
$ ./configure
$ make
# make install

See wandio instructions above for how to install BGPStream to a non-default location.

Troubleshooting

BGPStream is written in C and should compile with any ANSI compliant C Compiler which supports the C99 standard. We have tested BGPStream on FreeBSD, Linux and macOS using a variety of common compiler versions. Please open an issue on our GitHub page with any problems you encounter.

Installing from Ports Coming Soon...

BGPStream is available from FreeBSD ports at net/bgpstream:

$ cd /usr/ports/net/bgpstream
$ sudo make install clean

(BGPStream is a fairly new port, you may need to run portsnap fetch update first.)

Alternatively, if you are using the next-generation package manager (pkg), you can install BGPStream by running:

$ sudo pkg install bgpstream

The port will install all required dependencies (usually just libcurl and libwandio).

Installing from source

1. Install wandio:

$ cd /usr/ports/devel/wandio
$ sudo make install clean

Note: download timeout failures could happen if using earlier versions of wandio (<1.0.5)

2. Download and install BGPStream:

$ cd ~/src/
$ curl -LO https://github.com/CAIDA/libbgpstream/releases/download/v2.2.0/libbgpstream-2.2.0.tar.gz
$ tar zxf libbgpstream-2.2.0.tar.gz
$ cd libbgpstream-2.2.0/
$ ./configure
$ make
$ make check
$ sudo make install

Please open an issue on our GitHub page with any problems you encounter.

Installing using apt

1. Setup apt repositories

Step by step:

Install dependencies
sudo apt-get update
sudo apt-get install -y curl apt-transport-https ssl-cert ca-certificates gnupg lsb-release 
Install wandio repository
 curl -1sLf 'https://dl.cloudsmith.io/public/wand/libwandio/cfg/setup/bash.deb.sh' | sudo -E bash 
Install CAIDA repository
echo "deb https://pkg.caida.org/os/$(lsb_release -si|awk '{print tolower($0)}') $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/caida.list
sudo wget -O /etc/apt/trusted.gpg.d/caida.gpg https://pkg.caida.org/os/ubuntu/keyring.gpg 

One-liner:

curl -s https://pkg.caida.org/os/$(lsb_release -si|awk '{print tolower($0)}')/bootstrap.sh | bash 

2. Install BGPStream packages:

sudo apt update; sudo apt-get install bgpstream

Installing from source

1. Install dependencies:

sudo apt-get install build-essential curl zlib1g-dev libbz2-dev libcurl4-openssl-dev librdkafka-dev
NOTE: The minimum required version of librdkafka is 0.11.6.

2. Download and install wandio:

Note: DO NOT install the libwandio1 package. It is currently an out-of-date version of wandio.

$ mkdir ~/src
$ cd ~/src/
$ curl -LO https://github.com/LibtraceTeam/wandio/archive/refs/tags/4.2.4-1.tar.gz
$ tar zxf wandio-4.2.3.tar.gz
$ cd wandio-4.2.3/
$ ./configure
$ make
$ sudo make install
$ sudo ldconfig

Note: download timeout failures could happen if using earlier versions of wandio (<1.0.5)

See the generic install instructions for details on how to install into a non-default location.

3. Download and install BGPStream:

$ cd ~/src/
$ curl -LO https://github.com/CAIDA/libbgpstream/releases/download/v2.2.0/libbgpstream-2.2.0.tar.gz
$ tar zxf libbgpstream-2.2.0.tar.gz
$ cd libbgpstream-2.2.0/
$ ./configure
$ make
$ make check
$ sudo make install
$ sudo ldconfig

Please open an issue on our GitHub page with any problems you encounter.

Installing from source

1. Install dependencies:

$ sudo yum install zlib-devel bzip2-devel libcurl-devel

2. Download and install wandio:

$ mkdir ~/src
$ cd ~/src/
$ curl -LO https://github.com/LibtraceTeam/wandio/archive/refs/tags/4.2.4-1.tar.gz
$ tar zxf wandio-4.2.3.tar.gz
$ cd wandio-4.2.3/
$ ./configure
$ make
$ sudo make install
$ sudo ldconfig

Note: download timeout failures could happen if using earlier versions of wandio (<1.0.5)

See the generic install instructions for details on how to install into a non-default location.

3. Download and install BGPStream:

$ cd ~/src/
$ curl -LO https://github.com/CAIDA/libbgpstream/releases/download/v2.2.0/libbgpstream-2.2.0.tar.gz
$ tar zxf libbgpstream-2.2.0.tar.gz
$ cd libbgpstream-2.2.0/
$ ./configure
$ make
$ make check
$ sudo make install
$ sudo ldconfig

If you get the following error:

checking for wandio HTTP support... configure: error: wandio HTTP support required (install libcurl before building wandio)

and config.log contains an error like:

wandiocat: error while loading shared libraries: libwandio.so.1: cannot open shared object file: No such directory

Then you may need to run

$ sudo sh -c 'echo /usr/local/lib > /etc/ld.so.conf.d/usrlocal.conf'
$ sudo ldconfig

Please open an issue on our GitHub page with any problems you encounter.

Installing from the AUR

1. Install wandio:

$ git clone https://aur.archlinux.org/libwandio.git
$ cd libwandio
$ makepkg -si

Note: sudo is needed to run makepkg with the -i flag.

See the generic install instructions for details on how to install into a non-default location.

2. Download and install BGPStream:

$ git clone https://aur.archlinux.org/bgpstream.git
$ cd bgpstream
$ makepkg -si

Please submit a comment on the AUR page with any problems with building from the AUR.

Installing from HomeBrew Coming Soon...

Install BGPStream by running:

$ brew install bgpstream

Installing from source

1. Install libcurl:

Using MacPorts:

$ sudo port install curl

or, using Homebrew:

$ brew install curl

2. Download and install wandio:

$ mkdir ~/src
$ cd ~/src/
$ curl -LO https://github.com/LibtraceTeam/wandio/archive/refs/tags/4.2.4-1.tar.gz
$ tar zxf wandio-4.2.3.tar.gz
$ cd wandio-4.2.3/
$ ./configure
$ make
$ sudo make install

Note: download timeout failures could happen if using earlier versions of wandio (<1.0.5)

See the generic install instructions for details on how to install into a non-default location.

3. Download and install BGPStream:

$ cd ~/src/
$ curl -LO https://github.com/CAIDA/libbgpstream/releases/download/v2.2.0/libbgpstream-2.2.0.tar.gz
$ tar zxf libbgpstream-2.2.0.tar.gz
$ cd libbgpstream-2.2.0/
$ ./configure
$ make
$ make check
$ sudo make install

If you get the following error:

checking for library containing wandio_create... no
configure: error: libwandio required (http://research.wand.net.nz/software/libwandio.php)

But you have already installed wandio, then you may need to run:

$ export C_INCLUDE_PATH="/usr/local/include:$C_INCLUDE_PATH"
$ export LIBRARY_PATH="/usr/local/lib:$LIBRARY_PATH"

and then re-run configure.

Please open an issue on our GitHub page with any problems you encounter.