Comment 5 for bug 795991

Revision history for this message
Gurcan GERCEK (gurcangercek) wrote :

I think the problem with the package is version mismatch. pynids is looking for libnids1.24 but the repo contains the source of 1.23 although apt-cache search libnids list the package as 1.21 anyway,

Here are 2 solutions,

1) From original web site (http://jon.oberheide.org/pynids/)
wget http://jon.oberheide.org/pynids/downloads/pynids-0.6.1.tar.gz
tar xzvf pynids-0.6.1.tar.gz
cd pynids-0.6.1/libnids-1.24
./configure
# install any missing library according to ./configure output
nano src/Makefile
# add -fPIC to CFLAGS variable. Repeat this step after each ./configure if you need to rerun configure somehow
CFLAGS = -g -O2 -D_BSD_SOURCE -DLIBNET_VER=1 -DHAVE_ICMPHDR=1 -DHAVE_TCP_STATES=1 -DHAVE_BSD_UDPHDR=1 -fPIC
# build the libnids-1.24 with make
make
cd ..
# just in case first build to see everything is ok
python setup.py build
# then install it
python setup.py install

2) From github: https://github.com/MITRECND/pynids

# Clone the repository
git clone https://github.com/MITRECND/pynids
# build it, install any missing library according to output
sudo python setup.py build
# install it
sudo python setup.py install

Here is the libnids 1.25, if you want to check.
https://github.com/MITRECND/libnids

Both of the approach worked for me, I can import nids now, and tested with Example script in both of the projects.

I hope this will help.
I am using Xubuntu 12.10 64 bit