当前位置:网站首页>离线安装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
边栏推荐
- 嵌入式系统开发笔记79:为什么要获取本机网卡IP地址
- 674. longest continuous increasing sequence force buckle JS
- 线程常用方法与守护线程
- 208. implement trie (prefix tree)
- The problem of integrating Alibaba cloud SMS: non static methods cannot be referenced from the static context
- [leetcode skimming] February summary (updating)
- ThreeJS开篇
- 【发送邮件报错】535 Error:authentication failed
- 206.反转链表
- MySQL function variable stored procedure
猜你喜欢

NFT: utilisez EIP - 2981 pour commencer un voyage de redevances NFT

【TA-霜狼_may-《百人计划》】1.2.3 MVP矩阵运算

TASK04|数理统计

283.移动零

Knowledge supplement: basic usage of redis based on docker

嵌入式系统开发笔记79:为什么要获取本机网卡IP地址

类和对象收尾

Jenkins automatically cleans up construction history

【TA-霜狼_may-《百人计划》】1.2.2 矩阵计算

JMeter learning notes 2 - brief introduction to graphical interface
随机推荐
168. excel table column name
Web components series (VIII) -- custom component style settings
Quickly filter data such as clock in time and date: Excel filter to find whether a certain time point is within a certain time period
什么是uid?什么是Auth?什么是验证器?
Why can't you find the corresponding function by clicking go to definiton (super easy has a diagram)
Embedded System Development Notes 81: Using Dialog component to design prompt dialog box
171. excel table column No
Leetcode learning - day 36
Visit the image URL stored by Alibaba cloud to preview the thumbnail directly on the web page instead of downloading it directly
有效的 @SuppressWarnings 警告名称
TASK04|数理统计
166. fractions to decimals
Qt development experience tips 226-230
嵌入式系统开发笔记79:为什么要获取本机网卡IP地址
NFT: start NFT royalty journey with eip-2981
[TA frost wolf \u may- hundred people plan] 1.2.1 vector basis
206. reverse linked list
MFC window scroll bar usage
[untitled]
Analysis and case of pageobject mode