下載源碼包
https://www.wireshark.org/download.html
根據自己的需要下載對應的版本吧
安裝相應的依賴
apt install qttools5-dev qttools5-dev-tools libqt5svg5-dev qtmultimedia5-dev build-essential automake autoconf libgtk2.0-dev libglib2.0-dev flex bison libpcap-dev libgcrypt20-dev cmake -y
解壓
tar -Jxf wireshark-3.0.6.tar.xz
創建build文件夾
cd wireshark-3.0.6 && mkdir build && cd build
configure the source code to adapt it to the system
cmake ../
##下面是編譯後出現的提示
-- Configuring done
-- Generating done
-- Build files have been written to:
build the sources.
make
##這個過程一般在五分鐘左右,有進度條可以查看
然後安裝
make install