工作环境是Centos 7.9,原本是通过flathub安装的wireshark,但是在gnome的application installer上升级到wireshark 4.2.3之后就运行不起来了,flatpak run org.wireshark.Wireshark启动提示缺少qt6,查了一下wireshark新版是依赖qt6的而且centos 7只有qt5,旧版本的wireshark在flathub上也下载不到了,所以想从源码编译wireshark
wireshark官网地址Wireshark · Download
官网上也有编译说明Chapter 2. Setup and Build Instructions
编译需要cmake3,下载在https://rhel.pkgs.org/7/epel-x86_64/cmake3-3.17.5-1.el7.x86_64.rpm.html
试了一下编译4.2.3,发现依赖库的版本太低
CMake Error at /usr/share/cmake3/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
Could NOT find GCRYPT: Found unsuitable version "1.5.3", but required is at
least "1.8.0" (found /lib64/libgcrypt.so)
改成编译3.6.21,运行
bash
[root@localhost wireshark-3.6.21]# cmake3 .
[root@localhost wireshark-3.6.21]# make install
[root@localhost wireshark-3.6.21]# wireshark
编译时间会比较长
图标就在源码目录里org.wireshark.Wireshark.desktop