libnids libpcap libnet 安装中的错误解决方案(mark)

来源:互联网 发布:linux vi怎么编辑 编辑:程序博客网 时间:2024/06/05 09:24

安装libpcap出现:

1:error: Your operating system's lex is insufficient to compile libpcap. ex is a lex replacement that has many advantages, including being able to compile libpcap.
需要更新lex  ,执行命令:sudo apt-get install flex

2:出现错误
yacc -d grammar.y
make: yacc:命令未找到
make: *** [grammar.c] 错误 127
需要安装yacc
inux下是用flex和bison来分别代替lex和yacc的,安装直接使用命令:
sudo apt-get install bison

*************************************

安装libnet:
1:error: C++ preprocessor "/lib/cpp" fails sanity check
安装 g++ 编译器 (一款linux、unix等操作系统下的C++编译器
使用命令:sudo apt-get install g++

可能出现libnet的版本不符合要求

***************************************
安装libnids:
1:checking for GLIB... configure: error: Package requirements (glib-2.0 >= 2.2.0) were not met.

直接安装命令:sudo apt-get install "libglib2.0-dev"

编译程序是发生错误:
undefined reference to `pcap_parse'
不知道是什么原因说没有安装libpcap.


直接安装apt-get
sudo apt-get install libpcap-dev
sudo apt-get install libnids-dev
sudo apt-get install libnet1-dev

编译获取http的程序时发现无法截取无线网络的数据包。



传送门:http://hi.baidu.com/jiaoyuyang/blog/item/3e0cf4f1412c9aa3a40f5238.html/cmtid/deb24cee71ee4a38adafd572


原创粉丝点击