万物之中, 希望至美.

CentOS 7 编译最新的 wireshark/tshark 3.2.7 安装包

2020.10.10

系统环境

  • Docker
  • CentOS 7.5.1804

编译步骤

1. 安装 CentOS epel yum 仓库

yum install -y epel-release

2. 下载 Wireshark 源码并解压

# 下载源码
wget https://github.com/wireshark/wireshark/archive/v3.2.7.tar.gz
# 解压
tar -xzf wireshark-3.2.7.tar.gz

3. 安装编译所需工具

yum install -y libgcrypt-devel glib2-devel qt-devel qt5-qtbase-devel qt5-linguist qt5-qtmultimedia-devel qt5-qtsvg-devel libcap-devel libcap-ng-devel gnutls-devel krb5-devel libxml2-devel lua-devel lz4-devel snappy-devel spandsp-devel libssh2-devel bcg729-devel libmaxminddb-devel sbc-devel libsmi-devel libnl3-devel libnghttp2-devel libssh-devel libpcap-devel c-ares-devel redhat-rpm-config rpm-build gtk+-devel gtk3-devel desktop-file-utils portaudio-devel rubygem-asciidoctor docbook5-style-xsl docbook-style-xsl systemd-devel python34 cmake3 git gcc gcc-c++ flex bison doxygen gettext-devel libxslt cmake

4. Wireshark 源码 git 管理

# 进入到解压后的 Wireshark 源码目录
cd wireshark-3.2.7
# 初始化 git
git init
# 提交
git add .
git commit -m "First commit."

5. 编译 rpm 安装包

cmake3 ./

make rpm-package
comments powered by Disqus