当前位置:网站首页>离线安装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
边栏推荐
- Task04 mathematical statistics
- Edge浏览器的小技巧:Enter+Ctrl可以自动将地址栏转换为网址
- Jenkins自动清理构建历史
- JMeter login failure, extracting login token, and obtaining token problem solving
- [EI conference] the Third International Conference on nanomaterials and nanotechnology in 2022 (nanomt 2022)
- 【TA-霜狼_may-《百人计划》】1.2.2 矩阵计算
- [ta- frost wolf \u may- hundred people plan] 2.2 model and material space
- Embedded System Development Notes 79: why should I get the IP address of the local network card
- 【TA-霜狼_may-《百人计划》】1.1 渲染流水线
- [deep learning] (4) decoder mechanism in transformer, complete pytoch code attached
猜你喜欢

Network metering - application layer

This may be your last chance to join Tencent

In the innovation community, the "100 cities Tour" of the gold warehouse of the National People's Congress of 2022 was launched

互联网行业最佳产品开发流程 推荐!

Leetcode learning - day 36

定了!2022京东全球科技探索者大会之京东云峰会7月13日北京见
![[send email with error] 535 error:authentication failed](/img/58/8cd22fed1557077994cd78fd29f596.png)
[send email with error] 535 error:authentication failed

熊市下的Coinbase:亏损、裁员、股价暴跌

跳槽一次涨8k,5年跳了3次...

Custom components in applets
随机推荐
Edge浏览器的小技巧:Enter+Ctrl可以自动将地址栏转换为网址
Obtain detailed ideas for ABCDEF questions of 2022 American Games
【TA-霜狼_may-《百人計劃》】1.2.1 向量基礎
NFT:使用 EIP-2981 開啟 NFT 版稅之旅
[send email with error] 535 error:authentication failed
高并发下接口幂等性如何保证?
[deep learning] (4) decoder mechanism in transformer, complete pytoch code attached
LeetCode 1399. Count the maximum number of groups
什么是权限?什么是角色?什么是用户?
[untitled]
LeetCode 1400. Construct K palindrome strings
陈宇(Aqua)-安全->云安全->多云安全
Unity's 3D multi-point arrow navigation
JD intelligent customer service Yanxi intention system construction and intention recognition technology introduction
Knowledge supplement: basic usage of redis based on docker
创新界,聚势行 | 2022人大金仓“百城巡展”火热开启
Concurrent mode of different performance testing tools
208. implement trie (prefix tree)
采购数智化爆发在即,支出宝'3+2'体系助力企业打造核心竞争优势
嵌入式系统开发笔记79:为什么要获取本机网卡IP地址