wireshark源码编译

开发环境:

主机:mac pro 

虚拟机:virtural box 5.0.14

编译环境:ubuntu14.04(64位)


1.配置环境

1.1安装virtural box最新版本及增强包

1.2安装ubuntu14.04虚拟机



2.下载源码

https://www.wireshark.org/download/src/all-versions/wireshark-2.0.1.tar.bz2

解压后配置编译

./configure

make 

sudo make install

sudo ./wireshark


3.其实工具安装

3.1安装cmake

sudo apt-get install cmake


异常记录

1.opengl库冲突导致系统无法启动

由于之前系统缺少opengl相关的东西,安装libgl1-mesa-dev 时出现包冲突,删除冲突包导致重启后系统无法启动,于是重装系统并先安装这个库。


2.yacc错误

错误信息:

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


3.Qt错误

错误信息:

configure: error: Need a working C++ compiler to build Wireshark with Qt

解决办法:

sudo apt-get install qt5-default

4.c++错误

错误信息:

configure: error: Need a working C++ compiler to build Wireshark with Qt

解决办法:

sudo apt-get install g++


5.GTK错误

错误信息:

checking for GTK+ - version >= 3.0.0... no

*** 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

6.pcap错误

错误信息:

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?

解决办法:

sudo apt-get install libpcap-dev


7.3d加速

错误信息:

libGL error: pci id for fd 21: 80ee:beef, driver (null)

说明:

虚拟机设置使用3D加速后,部分应用无法启动,例如qtcreator

解决办法:

1.) Add the PPA Repository
  $ sudo add-apt-repository ppa:oibaf/graphics-drivers
2.) Update sources
  $ sudo apt-get update
3.) Dist-upgrade (rebuilds many packages)
  $ sudo apt-get dist-upgrade
4.) Then I rebooted.

注意:

升级系统OPENGL版本,会导致qtcreator找不到gl库,安装libgl1-mesa-dev又会导致包冲突,删除冲突的包会导致系统无法启动,暂时先禁用3D加速。

你可能感兴趣的:(wireshark源码编译)