您尚未登录。

楼主 #1 2020-03-24 22:21:36

杨飞武
会员
注册时间: 2019-11-01
已发帖子: 55
积分: 55

请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

qt.qpa.plugin: Could not find the Qt platform plugin "eglfs" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: linuxfb, minimal, offscreen, vnc.

Process killed by signal



--------------------------------------------------------------------
--------------------------------------------------------------------
查看/usr/lib/qt/plugins/platforms 目录如下,是没有eglfs
# cd /usr/lib/qt/plugins/platforms
# ls
libqlinuxfb.so    libqminimal.so    libqoffscreen.so  libqvnc.so
#

--------------------------------------------------------------------
--------------------------------------------------------------------

加 -platform linuxfb是可以运行的。 

但是怎么才能默认使用linuxfb来运行程序呢?

PC远程调试运行是不能加 -platform linuxfb的,所以想请教下大家。

最近编辑记录 杨飞武 (2020-03-24 22:25:12)

离线

#2 2020-03-25 08:20:01

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

你是用 gdb 远程调试吗?





离线

楼主 #3 2020-03-25 08:30:33

杨飞武
会员
注册时间: 2019-11-01
已发帖子: 55
积分: 55

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

是的呢

离线

#4 2020-03-25 08:45:03

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

gdb调试肯定可以加参数的,包括  -platform linuxfb

你的调试步骤是什么呢?





离线

#5 2020-03-25 09:18:19

shaoxi2010
会员
注册时间: 2019-06-13
已发帖子: 363
积分: 312

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

qt编译时指定默认使用参数就可

离线

#6 2020-03-25 09:20:51

shaoxi2010
会员
注册时间: 2019-06-13
已发帖子: 363
积分: 312

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

还有交叉编译联调应该是在gdbserver端加参数,肯定可以加参数的

离线

楼主 #7 2020-03-25 09:31:09

杨飞武
会员
注册时间: 2019-11-01
已发帖子: 55
积分: 55

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

晕哥 说:

gdb调试肯定可以加参数的,包括  -platform linuxfb

你的调试步骤是什么呢?


qt_creator 直接编译部署qt到 arm_linux开发板上,qt_creator上点运行按钮时候:

FluxBB bbcode 测试


不知道qt_creator上怎么指定linuxfb平台来运行

离线

楼主 #8 2020-03-25 09:38:46

杨飞武
会员
注册时间: 2019-11-01
已发帖子: 55
积分: 55

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

shaoxi2010 说:

qt编译时指定默认使用参数就可

在哪指定参数么。

离线

#9 2020-03-25 09:40:20

有梦的地方
会员
注册时间: 2020-03-17
已发帖子: 284
积分: 284

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

杨飞武 说:

qt_creator 直接编译部署qt到 arm_linux开发板上,qt_creator上点运行按钮时候:

https://whycan.cn/files/members/2288/20200325091916.png


不知道qt_creator上怎么指定linuxfb平台来运行

卡可执行文件是手动拷贝进去的吗?还是别的方式?

离线

楼主 #10 2020-03-25 10:06:27

杨飞武
会员
注册时间: 2019-11-01
已发帖子: 55
积分: 55

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

有梦的地方 说:

卡可执行文件是手动拷贝进去的吗?还是别的方式?


QT-Creator直接生成到 目标板的。

pro文件下指定了路径:
target.path=/home/firecat/Test
INSTALLS+=target

编译后就自动到目标板上了。
FluxBB bbcode 测试

离线

#11 2020-03-25 10:10:07

有梦的地方
会员
注册时间: 2020-03-17
已发帖子: 284
积分: 284

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

这个是模拟手动ssh root用户登录吧,我觉得在 /etc/profile.d/run.sh export 环境变量或许可以。

离线

楼主 #12 2020-03-25 10:19:37

杨飞武
会员
注册时间: 2019-11-01
已发帖子: 55
积分: 55

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

想试试远程调试

FluxBB bbcode 测试

配置好,PC端出现如下错误提示:

FluxBB bbcode 测试

最近编辑记录 杨飞武 (2020-03-25 10:20:57)

离线

#13 2020-03-25 10:29:56

有梦的地方
会员
注册时间: 2020-03-17
已发帖子: 284
积分: 284

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

感觉你这个问题和 linuxfb 没有关系,
写一个简单helloworld,
按上面的步骤看能不能单步调试?

离线

楼主 #14 2020-03-25 10:39:31

杨飞武
会员
注册时间: 2019-11-01
已发帖子: 55
积分: 55

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

有梦的地方 说:

感觉你这个问题和 linuxfb 没有关系,
写一个简单helloworld,
按上面的步骤看能不能单步调试?

查了了,上面这个错误,应该arm端的gdbserver和PC端的gdb架构不一致的问题。



就是想知道怎么不用加 linuxfb  就可以直接运行编译好的qt程序。
编译的时候需要怎么配置吗。

离线

楼主 #15 2020-03-25 10:54:48

杨飞武
会员
注册时间: 2019-11-01
已发帖子: 55
积分: 55

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

杨飞武 说:

现在执行程序的时候需要指定一下平台
./<app-name>   -platform  linuxfb


那么有没方法,不用加 -platform  linuxfb 后缀就可以运行呢。



已解决:
环境变量设置下就可以了。
QT_QPA_PLATFORM=linuxfb

离线

#16 2020-03-25 11:21:41

awfans
会员
注册时间: 2018-04-03
已发帖子: 264
积分: 264

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

杨飞武 说:


已解决:
环境变量设置下就可以了。
QT_QPA_PLATFORM=linuxfb

写到哪个文件呢?

离线

楼主 #17 2020-03-25 15:01:43

杨飞武
会员
注册时间: 2019-11-01
已发帖子: 55
积分: 55

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

awfans 说:

写到哪个文件呢?




写到/etc/profile 文件,
export QT_QPA_PLATFORM=linuxfb


source /etc/profile #使修改生效

离线

#18 2020-03-25 15:12:10

shaoxi2010
会员
注册时间: 2019-06-13
已发帖子: 363
积分: 312

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

杨飞武 说:

查了了,上面这个错误,应该arm端的gdbserver和PC端的gdb架构不一致的问题。



就是想知道怎么不用加 linuxfb  就可以直接运行编译好的qt程序。
编译的时候需要怎么配置吗。

在qt5base编译的时候指定参数-qpa linuxfb就可以,上面那个是GDB用错了,你可以用gdb-multiarch这个包,
通杀

离线

楼主 #19 2020-03-25 16:07:51

杨飞武
会员
注册时间: 2019-11-01
已发帖子: 55
积分: 55

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

shaoxi2010 说:

在qt5base编译的时候指定参数-qpa linuxfb就可以,上面那个是GDB用错了,你可以用gdb-multiarch这个包,
通杀


好的,感谢 big_smile

离线

楼主 #20 2020-03-25 16:23:19

杨飞武
会员
注册时间: 2019-11-01
已发帖子: 55
积分: 55

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

杨飞武 说:

好的,感谢 big_smile


交叉编译qt5base的时候可以指定,qt_creator编译qt代码的时候还能指定吗?

离线

楼主 #21 2020-03-25 16:23:53

杨飞武
会员
注册时间: 2019-11-01
已发帖子: 55
积分: 55

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

shaoxi2010 说:

在qt5base编译的时候指定参数-qpa linuxfb就可以,上面那个是GDB用错了,你可以用gdb-multiarch这个包,
通杀



交叉编译qt5base的时候可以指定,qt_creator编译qt代码的时候还能指定吗?

离线

#22 2020-03-25 16:37:38

shaoxi2010
会员
注册时间: 2019-06-13
已发帖子: 363
积分: 312

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

运行时可以指定,QT这么设计不就是为了跨平台嘛,编译指定就没意义了

离线

楼主 #23 2020-03-25 20:05:57

杨飞武
会员
注册时间: 2019-11-01
已发帖子: 55
积分: 55

Re: 请教怎么下怎么解决qt.qpa.plugin: Could not find the Qt platform plugin "eglfs"

shaoxi2010 说:

运行时可以指定,QT这么设计不就是为了跨平台嘛,编译指定就没意义了

也是哦,哈哈。

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn