ubuntu下编译安装wireshark

来源:互联网 发布:水彩绘画软件 编辑:程序博客网 时间:2024/05/01 20:33

天在ubuntu下进行安装wireshark,费了很多时间,过程中出了很多错误,但最终安装成功了,这里写下自己的安装步骤和方法,供大家参考。

安装编译工具:

  $sudo apt-get install build-essential

  为了成功编译Wireshark,您需要安装GTK+的开发文件和GLib库(libraries)。

  $sudo apt-get install libgtk2.0-dev libglib2.0-dev

  安装Checkinstall以便管理您系统中直接由源代码编译安装的软件。

  $sudo apt-get install checkinstall

wireshark源码下载地址:http://www.wireshark.org/download.html(页面中的source code)

下载后的文件名:wireshark-1.2.2.tar.bz2

cd到文件目录解压:$tar -xvf wireshark-1.2.2.tar.bz2

$cd wireshark-1.2.2

编译安装命令如下:

$./configure

$make
$sudo make install

其中make编译时间会比较长,这样下来就基本安装了。


以下是执行./configure命令时遇到的问题。

1.configure: error: I couldn't find yacc (or bison or ...); make sure it's installed and in your path 

    sudo apt-get install flex bison  

yacc(Yet Another Compiler Compiler),是Unix/Linux上一个用来生成编译器的编译器(编译器代码生成器)。


2.configure: error: Qt is not available

sudo apt-get install qt5-default


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

sudo apt-get install libgtk-3-dev


4. configure: error: Header file pcap.h not found; if you installed libpcap from source, did you also do "make install-incl", and if you installed a binary package of libpcap, is there also a developer's package of libpcap,  
    and did you also install that package?  
问题原因是ubuntu下缺少pcap.h等文件。
解决方法:
编译安装libpcap.
在www.tcpdump.org页面中可下载源码:libpcap-1.0.0.tar.gz
cd到文件目录:
    $tar -xvf libpcap-1.0.0.tar.gz  
    $cd libpcap-1.0.0.tar.gz  
    $./configure  
    $make  
    $sudo make install  
5.'aclocal-1.14' is missing on your system. 
You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' program is part of the GNU Automake package:
         <http://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <http://www.gnu.org/software/autoconf>
         <http://www.gnu.org/software/m4/>
         <http://www.perl.org/>
用软件中心安装Synaptic Package Manager,然后在安装autotools-dev  autoconf2.13,这样就可以make通过了。


0 0
原创粉丝点击