1. 程式人生 > >libnids libpcap libnet 安裝中的錯誤解決方案(mark)

libnids libpcap libnet 安裝中的錯誤解決方案(mark)

安裝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