linux编译wireshark源码
来源:互联网 发布:电子签名生成器软件 编辑:程序博客网 时间:2024/05/21 19:54
今天在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 --with-gtk3
$make
$sudo make install
其中make编译时间会比较长,这样下来就基本安装了。
下面是我这篇文章的关键,也是用ubuntu安装的过程中极有可能遇到的问题,且都是在进行./configure编译过程中出现,两个问题如下:
---------------------------------------------------------------------------------------------------------
问题1:
- ./configure执行到最后出错
- checking for perl... /usr/bin/perl
- checking for bison... no
- checking for byacc... no
- checking for yacc... no
- 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上一个用来生成编译器的编译器(编译器代码生成器)。
如想深入了解google下。
问题2:
- 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
----------------------------------------------------------------------------------------------------------------------------------------------------
采用上面的方法后再回到文章前面的步骤:
$cd wireshark-1.2.2编译安装:
$./configure
$make
$sudo make install
这样就安装好了。
启动方法:进入wireshark-1.2.2,输入命令:
- $sudo ./wireshark
这里如果不用sudo,则wireshark找不到网络设备接口,这主要与权限有关,启动时注意下就行。
--
sudo apt-get install libgtk-3-dev
- linux编译wireshark源码
- Wireshark源码编译总结
- wireshark源码vs2008编译
- wireshark源码编译
- wireshark源码 windows下编译
- Linux源码安装wireshark记录
- linux 编译安装wireshark出现的问题
- 编译wireshark
- windows下wireshark插件开发之源码编译
- 【wireshark】fedora 或者ubuntu 源码编译安装wireshark1.70
- 【wireshark】fedora 或者ubuntu 源码编译安装wireshark1.70
- wireshark-源码编译、AMIN协议、解析器讲解
- ubuntu12.04TLS下源码编译安装wireshark
- wireshark源码探索No.1---编译,调试,阅读
- linux内核源码编译
- linux源码编译
- 编译linux内核源码
- Linux源码编译安装
- IOS学习之UITableView
- 带有EXISTS谓词的子查询
- Qt学习之路之解决中文乱码
- 有关Log4j设置日志文件位置的处理
- 教你如何一键批量删除空间说说
- linux编译wireshark源码
- HDU1286:找新朋友
- linux/windows下eclipse+gdb调试ndk程序
- eclipse tomcat 配置
- C++项目第一步
- Stage3D
- 数据加密-怎样确定RSA Key 的长度
- 病毒木马查杀实战第011篇:QQ盗号木马之专杀工具的编写
- Qt学习之路之自定义消息框