我已经用C ++构建了一个Qt应用程序,该应用程序利用OpenCV并在Raspberry Pi上运行。由于某些原因,我无法使该应用程序直接在Raspberry Pi的显示器上运行。
如果将显示发送到远程xserver,应用程序运行正常,但是如果尝试运行并在Pi上运行的xserver上显示它,则会出现以下错误:
libEGL warning: DRI2: failed to authenticate
qt5ct: using qt5ct plugin
** (LCVTrial_CppOpenCV:1914): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
(LCVTrial_CppOpenCV:1914): GLib-GObject-WARNING **: cannot register existing type 'GtkWidget'
(LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
(LCVTrial_CppOpenCV:1914): GLib-GObject-WARNING **: cannot register existing type 'GtkBuildable'
(LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed
(LCVTrial_CppOpenCV:1914): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
(LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
(LCVTrial_CppOpenCV:1914): GLib-GObject-CRITICAL **: g_type_register_static: assertion 'parent_type > 0' failed
运行到远程显示器时不会显示任何错误。
我仅使用GUI制作了该应用程序的“精简版”版本,删除了OpenCV,它在Pi的显示器上运行良好。
对于在哪里寻找/调查的任何想法或方向将不胜感激!
答案 0 :(得分:0)
Raspi上缺少一些库 尝试在raspi终端上
sudo apt-get install at-spi2-core
在/ etc / environment中添加
QT_QPA_PLATFORMTHEME=gtk2
并且不要忘记更新gstreamer
希望有帮助