linux下libnids的安装

来源:互联网 发布:胖胖狗软件 编辑:程序博客网 时间:2024/06/06 01:45

1、安装libpcap(略)

2、安装libnet:

源文件下载地址:http://sourceforge.net/projects/libnet-dev/files/

解压:tar -zxvf libnet-1.1.6.tar.gz

cd libnet-1.1.6

./configure

make

make install

安装完以后,修改一下动态库配置文件,在/etc/ld.so.conf.d/目录下,新建文件“libnet.conf”,文件内容为:/usr/local/lib

3、安装libnids:

源文件下载地址:http://sourceforge.net/projects/libnids/files/

解压:tar -zxvf libnids-1.24.tar.gz

cd libnids-1.24

./configure

make

make install

4、用gcc编译源文件时后面加上:-lpcap -lnet -lnids -lgthread-2.0,因为libnids 1.22以后使用了,glib2库中的gthread-2.0来实现多线程提高效率,因此在编译除了-lnids -lpcap -lnet 以外还要加上 -lgthread-2.0

原创粉丝点击