当前位置:网站首页>离线安装wireshark2.6.10
离线安装wireshark2.6.10
2022-07-01 04:14:00 【boss-dog】
记录自己源码编译wireshark,部署到别的设备上进行离线安装的过程。
wireshark所有版本源码:https://github.com/wireshark/wireshark/tags
PS:注意系统是Centos还是Ubuntu,Ubuntu是不支持yum命令。
目录
- 1.下载wireshark源码包进行编译
- 2.实现离线安装wireshark
- 3.解决qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb, xcb. Reinstalling the application may fix this problem.
- 4.解决.wireshark:/home/Document/wireshark/lib/libm.so.6:version ‘GLIBC_2.29’not found(required by /usr/lib/x86_64-linux-gnu/libQt5Multimedia.so.5)
1.下载wireshark源码包进行编译
这里以wireshark2.6.10版本为例,下载tar.gz源码包后进行解压。
解压后进入到源码包内,新建build文件夹,进入到build文件夹内,开始进行cmake。
mkdir build && cd build
为了方便后面移动到别的设备上,需要将编译好的依赖库cmake到指定的位置,这里以放在/home/zzw/test/lib目录为例:
cmake:指定目标文件的安装位置
cmake -DCMAKE_INSTALL_PREFIX=/home/zzw/test/lib ..

然后make
sudo make
生成可执行程序
sudo make install

运行可执行程序:
打开bin目录,运行wireshark
./wireshark

2.实现离线安装wireshark
将编译好的可执行程序文件夹整个打包移到新的系统中,
为了进行验证,在运行可执行程序wireshark前,需要指定临时的环境变量,防止文件找不到动态链接库.so,因为在cmake时,指定了路径,所以相关的lib库都在lib文件夹中,
终端执行(为方便演示用户名改为duoduo):
export LD_LIBRARY_PATH=/home/duoduo/test/wiresharkLIB/wireshark/lib:$LD_LIBRARY_PATH
再运行可执行程序:
./wireshark
如果报错缺少什么依赖库,可以执行:
ldd wireshark

可根据提示去查找相关缺失的动态链接库,一般都在编译源代码的电脑中,根据库的名称去寻找,可以先存放在临时的环境变量中,如可运行后,再将相关的动态链接库放到系统目录下,比如/usr/local/bin中等等。
PS:缺少什么库去寻找的时候,记得看下库是否存在软链接,相关的库都要复制过去。
ll libQt5Network.so.5
// cp -d:若源文件为连接文件杜属性,则复制连接文件属性而非文件本身
cp -d libQt5Network.so.5 /home/aubo/test/lib_wireshark1
3.解决qt.qpa.plugin: Could not find the Qt platform plugin “xcb” in. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb, xcb. Reinstalling the application may fix this problem.
报错信息如下:
①首先按照字面意思就是Qt platform plugin没有初始化,很有可能就是这个插件没有加载,那么,先设置下环境变量,
如下:
export QT_PLUGIN_PATH=/home/duoduo/Qt5.12.2/5.12.2/gcc_64/plugins:$QT_PLUGIN_PATH
其中“/home/duoduo/Qt5.12.2/5.12.2/gcc_64/plugins”是你自己安装的QT的路径,根据自己电脑的路径进行修改即可。
②如若还未解决,需要设置环境变量
export QT_DEBUG_PLUGINS=1
加了这个环境变量,可以看到QT程序加载的过程,看到详细的报错信息,如缺少什么库等等,补全即可。
4.解决.wireshark:/home/Document/wireshark/lib/libm.so.6:version ‘GLIBC_2.29’not found(required by /usr/lib/x86_64-linux-gnu/libQt5Multimedia.so.5)
错误原因:可能是Qt版本不对,可删除掉该系统上相关的Qt依赖库,从编译好源码的系统上复制相关依赖库移到到新设备上。
比如我这个报错的依赖库是libQt5Multimedia.so.5
参考:
https://blog.csdn.net/weixin_42135399/article/details/82385122
http://linuxkiss.com/qt-question/924.html
https://blog.csdn.net/baobei0112/article/details/115370252?spm=1001.2014.3001.5502
下面是我已经源码编译好了的wireshark2.6.10,有需要的下载。
https://download.csdn.net/download/qq_45445740/85724452
边栏推荐
- "Target detection" + "visual understanding" realizes the understanding of the input image
- 208. implement trie (prefix tree)
- 389. find a difference
- Grid system in bootstrap
- 206.反转链表
- 【TA-霜狼_may-《百人計劃》】1.2.1 向量基礎
- ThreeJS开篇
- Analysis and case of pageobject mode
- Inventory the six second level capabilities of Huawei cloud gaussdb (for redis)
- Qt development experience tips 226-230
猜你喜欢

Jenkins自动清理构建历史

Possible problems and solutions of using scroll view to implement slider view

NFT: start NFT royalty journey with eip-2981

Huawei simulator ENSP - hcip - Hybrid Experiment 2

TASK04|數理統計

ThreeJS开篇

One job hopping up 8K, three times in five years

Why can't you find the corresponding function by clicking go to definiton (super easy has a diagram)

TASK04|数理统计

431. 将 N 叉树编码为二叉树 DFS
随机推荐
206.反转链表
[TA frost wolf \u may- hundred talents plan] 1.2.3 MVP matrix operation
DO280管理应用部署--RC
Custom components in applets
What are permissions? What are roles? What are users?
431. 将 N 叉树编码为二叉树 DFS
206. reverse linked list
Analysis and case of pageobject mode
陈宇(Aqua)-安全->云安全->多云安全
Class and object finalization
Spock单元测试框架介绍及在美团优选的实践___第一章
Note de développement du système embarqué 80: application du concepteur Qt à la conception de l'interface principale
Possible problems and solutions of using scroll view to implement slider view
How to ensure the idempotency of the high concurrency interface?
有效的 @SuppressWarnings 警告名称
TASK04|數理統計
LetCode 1829. Maximum XOR value per query
互联网行业最佳产品开发流程 推荐!
程序员女友给我做了一个疲劳驾驶检测
NFT: utilisez EIP - 2981 pour commencer un voyage de redevances NFT