美文网首页
Ubuntu 编译安装wireshark2.02

Ubuntu 编译安装wireshark2.02

作者: 安全外围人 | 来源:发表于2016-03-17 23:38 被阅读447次

参考:http://blog.csdn.net/cumirror/article/details/4694283

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

安装编译工具:

$sudo apt-get install build-essential

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

$sudo apt-get install libgtk2.0-dev libglib2.0-dev #这个库已经升级

apt-get install libgtk3.0-cil libgtk3.0-cil-dev 正确的库

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

$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编译时间会比较长,这样下来就基本安装了。

./configure执行到最后出错

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上一个用来生成编译器的编译器(编译器代码生成器)。

如想深入了解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   

这样就安装好了,编译时间很长。。。。。

启动使用sudo 不然没有权限

相关文章

网友评论

      本文标题:Ubuntu 编译安装wireshark2.02

      本文链接:https://www.haomeiwen.com/subject/fkvclttx.html