qt - Rapsbian 和 Qt5
问题描述
我正在 Raspberry Pi 3 上使用 qt5.11 开发应用程序。我的代码在我的笔记本电脑上运行 ubuntu 18.xx。当我将代码放在 RPi 上时,我可以使用 Makefile 对其进行编译,make -j2
但是当我想启动我的程序时,我会收到以下消息:
16:02:44: Starting /home/pi/build-VideoProcessor-Desktop-Debug/VideoProcessor...
**libEGL warning: DRI2: failed to authenticate**
**qt5ct: using qt5ct plugin**
(VideoProcessor:985): GLib-GObject-WARNING **: 16:02:55.208: cannot register existing type 'GtkWidget'
(VideoProcessor:985): GLib-GObject-CRITICAL **: 16:02:55.208: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
(VideoProcessor:985): GLib-GObject-WARNING **: 16:02:55.208: cannot register existing type 'GtkBuildable'
(VideoProcessor:985): GLib-GObject-CRITICAL **: 16:02:55.208: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed
(VideoProcessor:985): GLib-CRITICAL **: 16:02:55.208: g_once_init_leave: assertion 'result != 0' failed
(VideoProcessor:985): GLib-GObject-CRITICAL **: 16:02:55.208: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
(VideoProcessor:985): GLib-GObject-CRITICAL **: 16:02:55.208: g_type_register_static: assertion 'parent_type > 0' failed
我不明白我的 RPi 发生了什么,因为我的代码适用于我的笔记本电脑。
解决方案
我相信这个问题是因为你没有启用 OpenGL 支持。
跑:
sudo raspi-config
然后选择:
Advanced Options
GL Driver
GL (Fake KMS)
重启后应该可以正常工作。
这将消除此错误:libEGL 警告:DRI2:身份验证失败。
推荐阅读
- jhipster - 如何在 Jhipster 中定义和对象集合?
- excel - 如何使用 Excel 作为数据源并在 UIPath 中执行 SQL 查询
- r - 绘制具有不同长度的 2 个变量以显示比例,而不是绝对数字
- docker - 如何在 Dockerfile 中卸载 docker 卷?
- c# - Azure 功能:在 MAIL FROM [DB6P189CA0021.EURP189.PROD.OUTLOOK.COM] 期间,客户端未经过身份验证以发送匿名邮件
- python - Django 通道:连接到套接字
- nested - TYPO3:带有嵌套 For 循环的 If 语句的内联表示法
- node.js - nodejs base64到blob的转换
- gitlab - 如何在 gitlab 项目页面中隐藏冗余(auto devops kubernetes CI/CD)按钮
- python - 如何在 django admin 的非只读字段中突出显示一些单词?