libpcap arm移植,libpcaparm

來源:互聯網
上載者:User

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.