參考:http://blog.csdn.net/cumirror/article/details/4694283
今天在ubuntu下進(jìn)行安裝wireshark怒炸,費(fèi)了很多時(shí)間叛甫,過程中出了很多錯(cuò)誤啄糙,但最終安裝成功了定枷,這里寫下自己的安裝步驟和方法金闽,供大家參考纯露。
安裝編譯工具:
$sudo apt-get install build-essential
為了成功編譯Wireshark,您需要安裝GTK+的開發(fā)文件和GLib庫(libraries)代芜。
$sudo apt-get install libgtk2.0-dev libglib2.0-dev #這個(gè)庫已經(jīng)升級
apt-get install libgtk3.0-cil libgtk3.0-cil-dev 正確的庫
安裝Checkinstall以便管理您系統(tǒng)中直接由源代碼編譯安裝的軟件。
$sudo apt-get install checkinstall
wireshark源碼下載地址:http://www.wireshark.org/download.html(頁面中的source
cd到文件目錄解壓:$tar -xvf wireshark-2.0.2.tar.bz2
$./configure
$make
$sudo make install?? #基本不會成功
其中make編譯時(shí)間會比較長挤庇,這樣下來就基本安裝了。
./configure執(zhí)行到最后出錯(cuò)
checkingforperl...?/usr/bin/perl
checkingforbison...?no
checkingforbyacc...?no
checkingforyacc...?no
configure:?error:?I?couldn't?find?yacc?(or?bison?or?...);?make?sure?it's?installed?andinyour?path
解決辦法:
sudo apt-getinstall flex bison
yacc(Yet Another Compiler Compiler)嫡秕,是Unix/Linux上一個(gè)用來生成編譯器的編譯器(編譯器代碼生成器)渴语。
如想深入了解google下。
問題2:
configure: error: Header file pcap.h not found;ifyou installed libpcap from source, did you alsodo"make install-incl", andifyou installed a binary package of libpcap,isthere also a developer's package of libpcap,
and?did?you?also?install?that?package?
問題原因是ubuntu下缺少pcap.h等文件昆咽。
解決方法:
編譯安裝libpcap.
在www.tcpdump.org頁面中可下載源碼 libpcap-1.7.4.tar.gz
$tar -xvf libpcap-1.0.0.tar.gz
$cd?libpcap-1.0.0.tar.gz
$./configure
$make
$sudo?make?install
問題3:
*** Could not run GTK+ test program, checking why...*** The test
program failed to compile or link. See the file config.log for the***
exact error that occured. This usually means GTK+ is incorrectly
installed.configure: error: GTK+ 3 is not available
解決辦法
./configure --with-gtk2 這樣就能通過
$make
$sudo make install???
這樣就安裝好了牙甫,編譯時(shí)間很長调违。窟哺。技肩。。虚婿。
啟動(dòng)使用sudo 不然沒有權(quán)限