源码版本:3.3.0国密
首先安装依赖:
1 2 3 4 5 6 7 8 |
sudo apt install -y libpcap-dev sudo apt install -y libgcrypt11-dev sudo apt install -y flex sudo apt install -y bison sudo apt install -y qttools5-dev sudo apt-get install -y qtmultimedia5-dev sudo apt-get install -y libqt5svg5-dev sudo apt install -y libc-ares-dev |
然后使用cmake生成Makefile:
1 2 3 |
mkdir build cd build cmake .. |
这样编译是没有问题的,不过可以看到cmake提示了大量的可选的依赖不存在。我们实际上还可以直接使用命令:
1 |
sudo apt build-dep wireshark-qt |
来安装依赖。
之后直接在build目录下编译就可以:
1 |
make |
结果位于builid/run目录下。
如果没有图形界面或QT相关代码报错的话,可以在CMakeOptions.txt中把wireshark设成OFF:
1 2 3 4 5 6 7 8 |
cat ../CMakeOptions.txt # Build options for use by CMake option(BUILD_wireshark "Build Wireshark" OFF) <------改这里 option(BUILD_tshark "Build tshark" ON) option(BUILD_tfshark "Build tfshark" OFF) option(BUILD_rawshark "Build rawshark" ON) option(BUILD_dumpcap "Build dumpcap" ON) |
参考资料:
1、https://ask.wireshark.org/question/15884/wireshark-built-from-source-no-interfaces-found-but-the-version-from-the-apt-repo-works/
2、https://www.wireshark.org/docs/wsug_html_chunked/ChBuildInstallUnixBuild.html,官网文档
转载时请保留出处,违法转载追究到底:进城务工人员小梅 » Ubuntu 18.04 LTS编译Wireshark