当前位置:网站首页>离线安装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
边栏推荐
- In the innovation community, the "100 cities Tour" of the gold warehouse of the National People's Congress of 2022 was launched
- Libevent Library Learning
- Possible problems and solutions of using scroll view to implement slider view
- Task04 mathematical statistics
- [leetcode skimming] February summary (updating)
- 盘点华为云GaussDB(for Redis)六大秒级能力
- How to ensure the idempotency of the high concurrency interface?
- 205. isomorphic string
- What does ft mean in the data book table
- [Master / slave] router election in DD message
猜你喜欢

Unity's 3D multi-point arrow navigation

Hololens2 development environment building and deploying apps

DO280管理应用部署--RC

Volley parsing data shows networking failure

CF1638E colorful operations

After many job hopping, the monthly salary is equal to the annual salary of old colleagues

TS type gymnastics: illustrating a complex advanced type

【深度学习】(4) Transformer 中的 Decoder 机制,附Pytorch完整代码

Custom components in applets

Task04 | statistiques mathématiques
随机推荐
[EI conference] the Third International Conference on nanomaterials and nanotechnology in 2022 (nanomt 2022)
Libevent Library Learning
Network metering - application layer
高并发下接口幂等性如何保证?
[untitled] Li Kou 496 Next larger element I
[leetcode skimming] February summary (updating)
不同性能测试工具的并发模式
171. excel table column No
318. Maximum word length product
What are permissions? What are roles? What are users?
京东智能客服言犀意图体系搭建和意图识别技术介绍
Embedded System Development Notes 81: Using Dialog component to design prompt dialog box
Jenkins自动清理构建历史
Browser top loading (from Zhihu)
小程序中自定义组件
Procurement intelligence is about to break out, and Alipay'3+2'system helps enterprises build core competitive advantages
熊市下的Coinbase:亏损、裁员、股价暴跌
有效的 @SuppressWarnings 警告名称
Unity's 3D multi-point arrow navigation
LeetCode 1399. Count the maximum number of groups