我正在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是怎么回事,因为我的代码可以在我的笔记本电脑上运行。
发布于 2020-12-31 08:04:13
我认为这个问题是因为您没有启用OpenGL支持。
运行:
sudo raspi-config
然后选择:
Advanced Options
GL Driver
GL (Fake KMS)
这应该会在重启后让一切正常工作。
这将消除此错误: libEGL警告: DRI2:无法进行身份验证。
https://stackoverflow.com/questions/59928395
复制相似问题