libpcap arm移植,libpcaparm
libpcap
a portable C/C++ library for network traffic capture.
下載
http://www.tcpdump.org/#latest-release
或者到這裡:http://download.csdn.net/detail/chinaeran/8631799
編譯
註:此處使用 arm-linux-gnueabihf-gcc,--build 使用的是64位Linux,可以不添加此參數
解壓後運行如下命令:
$ ./configure --host=arm-linux-gnueabihf --build=i686-pc-linux
報錯如下:
configure: error: pcap type not determined when cross-compiling; use--with-pcap=… follow 解決**方法:
將 configure 檔案中的如下內容注釋掉
# if test -z "$with_pcap" && test "$cross_compiling" = yes; then# as_fn_error $? "pcap type not determined when cross-compiling; use --with-pcap=..." "$LINENO" 5# fi
繼續
$ ./configure --host=arm-linux-gnueabihf --build=i686-pc-linux
報錯:
configure: error: Your operating system’s lex is insufficient to compile
libpcap. flex is a lex replacement that has many advantages, including
being able to compile libpcap. For more information, see
http://www.gnu.org/software/flex/flex.html .
安裝flex
$ sudo apt-get install flex$ ./configure --host=arm-linux-gnueabihf --build=i686-pc-linux$ make
依然報錯:
make: yacc: Command not found
再安裝byacc
$ sudo apt-get install byacc$ make
終於成功啦!!!
目標路徑:./.libs/libcconv.so.0.0.0