Linux下安装Libnids1.24

Libnids需要libpcap和libnet库的支持,首先安装这两个开发包。

1、安装 libpcap
下载libpcap包。
./configure
configure: error: yacc is insufficient to compile libpcap.
libpcap requires Bison, Berkeley YACC, or another YACC compatible with them.

apt-get install bison
E: Package ‘bison’ has no installation candidate

// kali 更新源修改
/etc/apt/source.list

apt-get update
apt-get upgrade
apt-get install bison

安装libpcap

./configure
make
make install

2、安装libnet
下载libnet

./configure
make
make install

3、安装libnids1.24
下载libnids1.24包
./configure
错误:

checking for pkg-config… no checking for GLIB… configure: error:
The pkg-config script could not be found or is too old. Make sure it

apt-get install pkg-config

./configure

hecking for GLIB… configure: error: Package requirements (glib-2.0>= 2.2.0) were not met. Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard
prefix.

sudo apt-get install “libglib2.0-dev”

./configure
make
make install

root@God:~/Desktop/Libnids/libnids-1.24# ls /usr/local/lib/libni*
/usr/local/lib/libnids.a

安装完成。

4、gcc编译相关程序

gcc printall.c -o printall -lpcap -lnet -lnids -lgthread-2.0 -lglib-2.0

你可能感兴趣的:(协议学习)