2025年ubuntu 内核源码(ubuntu系统源码)

ubuntu 内核源码(ubuntu系统源码)官网 https www wireshark org 官方文档 Wireshark Documentatio wireshark 1 是一款抓包工具 wireshark 的 GUI 用户界面 框架从开发版本 1 11 0 2013 11 15 开始项目方向的一个重大变化是由 GTK 切换到了 Qt 2 Wireshark 1 11 0 Development

大家好,我是讯享网,很高兴认识大家。



官网:https://www.wireshark.org/

官方文档:Wireshark · Documentation

wireshark[^1]是一款抓包工具。wireshark的GUI(用户界面)框架从开发版本 1.11.0 (2013.11.15)开始项目方向的一个重大变化是由GTK+切换到了Qt[^2]。

Wireshark 1.11.0 Development Release[^3]

 November 15, 2013

The following features are new (or have been significantly updated) since version 1.10:

- Wireshark now uses the Qt application framework.

Ubuntu 20.04.4 LTS

源码编译参考:2.7. Building from source under UNIX or Linux (wireshark.org)

从官网下载源码后解压。这里下载的是当前最新版本wireshark-4.0.2

</p><p># tar xvf wireshark-4.0.2.tar.xz</p><p>

qt

</p><p>$ sudo apt-get install build-essential</p><p>$ sudo apt-get install qtcreator</p><p>$ sudo apt-get install qt5-default</p><p>//启动qt</p><p>$ qtcreator</p><p>

cmake

</p><p>apt-get install -y make cmake pkg-config</p><p>

其他依赖可以根据提示再进行安装。

cmake编译一般会新建一个编译用的目录

</p><p>wireshark-4.0.2# mkdir build</p><p>

cmake编译生成makefile文件

</p><p>wireshark-4.0.2# cd build/</p><p>wireshark-4.0.2/build# cmake ..</p><p>-- Configuring done               &lt;&lt;&lt; cmake成功</p><p>-- Generating done</p><p>

cmake编译后虽然还是很多提示Could NOT find,但只要能运行完成没有error提示就不影响后面的编译。

问题1:缺少pkg-config

</p><p>wireshark-4.0.2/build# cmake ..</p><p>-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)</p><p>

解决:

</p><p>apt-get install -y pkg-config</p><p>

问题2:缺少GLIB2

</p><p>-- Checking for one of the modules &#39;glib-2.0&#39;</p><p>CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):</p><p>  Could NOT find GLIB2 (missing: GLIB2_LIBRARY GLIB2_MAIN_INCLUDE_DIR</p><p>

 解决:

</p><p>//1 搜索库</p><p># apt-cache search libglib</p><p>gvfs-bin - userspace virtual filesystem - deprecated command-line tools</p><p>libglib-object-introspection-perl - Perl bindings for gobject-introspection libraries</p><p>libglib-perl - interface to the GLib and GObject libraries</p><p>libglib2.0-0 - GLib library of C routines</p><p>libglib2.0-bin - Programs for the GLib library</p><p>libglib2.0-data - Common files for GLib library</p><p>libglib2.0-dev - Development files for the GLib library</p><p>libglib2.0-dev-bin - Development utilities for the GLib library</p><p>libglib2.0-doc - Documentation files for the GLib library</p><p><br></p><p>//2 安装库</p><p># apt-get install -y libglib2.0-dev</p><p>

问题3:缺少GCRYPT

</p><p>  Could NOT find GCRYPT (missing: GCRYPT_LIBRARY GCRYPT_INCLUDE_DIR)</p><p>  (Required is at least version &#34;1.8.0&#34;)</p><p>

解决:

</p><p>$ sudo apt-file update</p><p>$ apt-file search gcrypt.h</p><p>apt-get install libgcrypt-dev</p><p>


讯享网

问题4:缺少CARES

</p><p>Could NOT find CARES (missing: CARES_LIBRARY CARES_INCLUDE_DIR) (Required</p><p>  is at least version &#34;1.13.0&#34;)</p><p>

解决:

</p><p>apt-get install libc-ares-dev</p><p>

问题5:缺少LEX

</p><p> Could NOT find LEX (missing: LEX_EXECUTABLE)</p><p>

解决:

</p><p>apt-get install flex bison</p><p>

问题6:缺少Gettext

</p><p>-- Could NOT find Gettext (missing: GETTEXT_MSGMERGE_EXECUTABLE GETTEXT_MSGFMT_EXECUTABLE)</p><p>

解决:

</p><p>apt-get install gettext</p><p>

问题7:缺少LIBSSH

</p><p>-- Could NOT find LIBSSH (missing: LIBSSH_LIBRARIES LIBSSH_INCLUDE_DIRS LIBSSH_VERSION) (Required is at least version &#34;0.6&#34;)</p><p>

解决:

</p><p>apt-get install libssh-dev</p><p>apt-get install libssh2-1-dev</p><p>

问题8:缺少libpcap

</p><p>-- Checking for one of the modules &#39;libpcap&#39;</p><p>-- Could NOT find PCAP (missing: PCAP_LIBRARY PCAP_INCLUDE_DIR)</p><p>

解决:

</p><p>apt-get install libpcap-dev</p><p>

问题9:缺少Qt5LinguistTools

</p><p>  Could not find a package configuration file provided by &#34;Qt5LinguistTools&#34;</p><p>  with any of the following names:</p><p><br></p><p>    Qt5LinguistToolsConfig.cmake</p><p>    qt5linguisttools-config.cmake</p><p>

解决:

</p><p>apt-get install qttools5-dev</p><p>

问题10:缺少Systemd

</p><p>-- Could NOT find Systemd (missing: SYSTEMD_LIBRARY SYSTEMD_INCLUDE_DIR) (found version &#34;&#34;)</p><p>

可选依赖库可以忽略。

cmake生成makefile后

</p><p>wireshark-4.0.2/build# make</p><p><br></p><p>Scanning dependencies of target wmem</p><p>[  0%] Building C object wsutil/wmem/CMakeFiles/wmem.dir/wmem_array.c.o</p><p>[  0%] Built target wmem</p><p>Scanning dependencies of target l16mono</p><p>[100%] Linking C shared module /run/plugins/4.0/codecs/l16mono.so</p><p>[100%] Built target l16mono</p><p>

make编译生成可执行文件在build/run目录下,可以直接运行。

</p><p>wireshark-4.0.2/build# run/wireshark</p><p>  (wireshark:) 09:47:59.035931 [Capture MESSAGE] -- Capture Start ...</p><p>  (wireshark:) 09:47:59. [Capture MESSAGE] -- Capture started</p><p>

可以运行图形界面说明已经成功了!如果希望安装到系统也可以make install,这样就可以加入环境变量只要用wireshark命令就可以启动了。

[^1]: Wireshark - Arch Linux 中文维基 (archlinuxcn.org)

[^2]: Wireshark 正在使用 Qt 进行重写 - OSCHINA - 中文开源技术交流社区

[^3]: Wireshark · Wireshark 1.11.0 Development Release

小讯
上一篇 2025-06-07 23:02
下一篇 2025-04-24 13:59

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/147046.html