ubuntu10.04 編譯安裝wireshark1.10.0

來源:互聯網
上載者:User

    因為使用的是源碼編譯安裝,查看解壓後的install檔案,如是說:如果想構建wireshark,首先確保GTK+和Glib已安裝;使用命令pkg-config glib-2.0 --modversion可檢測Glib2.x是否已安裝,我的執行結果是2.24.1,看來已經安裝過了;使用命令pkg-config gtk+-2.0 --modversion檢測GTK+ 2.x是否已安裝,我的結果是2.20.1,看來這個也沒問題。
    文檔如是說:如果你想抓包,要先安裝libpcap,可在網站http://www.tcpdump.org下載。
    具體過程:
    1. libpcap安裝:
    #./configure       //可添加--prefix=/usr/local/libpcap-1.4.0指定安裝目錄
    如果報如下錯: configure : error : your operating system's lex is insufficient to compile libpcap. ..
    可使用命令flex -V查看其版本,根據提示使用apt-get install flex安裝flex。
    #make
   也出現報錯:make : yacc : 命令未找到  make : *** [grammer.c] 錯誤 127
    linux下是用flex和bison來分別代替lex和yacc的,安裝直接使用命令:#apt-get install bison
    # make install   // 一切正常
   2. wireshark安裝:
    #./configure --prefix=/usr/local/wireshark-1.10.0
    又報錯:configure : error : Head file pcap.h not found
    我已經安裝過libpcap了,看來我自己指定的目錄使他沒有找到標頭檔,於是我設定環境變數:C_INCLUDE_PATH=/usr/local/libpcap-1.4.0/include和LD_LIBRARY_PATH=/usr/local/libpcap-1.4.0/lib還有LIBRARY_PATH=/usr/local/libpcap-1.4.0/lib。
    #make      //大概十多分鐘吧
    #make install          //安裝成功
    3. 使用wireshark
    進入安裝目錄執行./wireshark。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.