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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章