Linux Mint下編譯安裝支援SPDY協議的Wireshark

來源:互聯網
上載者:User

做成指令碼了,儲存成檔案,sudo ./xxx.sh即可。

#!/bin/bash

# 如果沒有加sudo,提示錯誤並退出 
if [ "x$(id -u)" != x0 ]; then   
  echo "Error: please run this script with 'sudo'."   
  exit 1 
fi
#安裝依賴的源碼和工具
sudo apt-get -yf install libssl-dev libpcap-dev git-core autoconf automake libtool bison flex gnome-core-devel libgnutls-dev
#下載和解壓wireshark源碼
wget http://www.wireshark.org/download/src/all-versions/wireshark-1.7.1.tar.bz2
tar jxvf wireshark-1.7.1.tar.bz2
#下載spdyshark擴充包代碼
git clone https://code.google.com/p/spdyshark/
cp -r spdyshark/spdyshark wireshark-1.7.1/plugins/
#patch
cd wireshark-1.7.1
patch -p1 < ../spdyshark/spdyshark_build.patch
./autogen.sh
#配置
./configure --with-ssl
#解決編譯時間treat warning as error的問題
sed -i /'AM_CFLAGS = -Werror'/d wsutil/Makefile
sed -i /'AM_CFLAGS = -Werror'/d epan/ftypes/Makefile
#解決連結時找不到g_module_name函數的問題。這是wireshark源碼的bug,官方是如下的解決方案
sed -i '370a @GLIB_LIBS@ \\' Makefile.am
#編譯
make
#安裝。如想打包成deb,此處應為sudo checkinstall
sudo make install

為了把編譯出來的程式打包成deb,方便安裝到其它機器,可以先安裝checkinstall
sudo apt-get install checkinstall
然後上述指令碼不要運行最後一行的sudo make install,而是這樣:
sudo checkinstall
根據提示輸入一些包資訊,這樣就會產生deb安裝包了。

最後,要運行wireshark,可能需要先匯出一個路徑:

export LD_LIBRARY_PATH=/usr/local/lib

或者先

sudo ldconfig

要得到root許可權才能截包:

sudo wireshark

帶有spdy支援的wireshark,在Preferences的Protocols下會有SPDY選項。

註:本文的方法在Ubuntu13、Linux Mint 15下測試通過。

以上方法能在32bit和64bit系統都適用。64bit的deb包下載:

------------------------------------------分割線------------------------------------------

FTP地址:ftp://ftp1.bkjia.com

使用者名稱:ftp1.bkjia.com

密碼:www.bkjia.com

在 2014年LinuxIDC.com\3月\Linux Mint下編譯安裝支援SPDY協議的Wireshark

下載方法見

------------------------------------------分割線------------------------------------------

Wireshark 的詳細介紹:請點這裡
Wireshark 的:請點這裡

網路抓包工具Wireshark的簡單使用

Ubuntu 12.04 下安裝Wireshark

Linux中從普通使用者啟動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.