我在笔记本电脑中交叉编译了Qt5.12并将其安装在运行Raspbian Stretch OS的Raspberry Pi 3上。我正在尝试远程调试RPi上运行的应用程序(从QtCreator)。
当我使用./app -platform xcb
之类的命令从RPi终端运行Qt应用程序时,它运行良好,但是当我尝试从远程调试会话运行同一应用程序时,得到以下输出:
Could not load shared library symbols for /usr/local/qt5pi/plugins/platforms/libqxcb.so.
Do you need "set solib-search-path" or "set sysroot"?qt.qpa.xcb: could not connect to display
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/qt5pi/plugins/platforms" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are:
eglfs (from /usr/local/qt5pi/plugins/platforms),
linuxfb (from /usr/local/qt5pi/plugins/platforms),
minimal (from /usr/local/qt5pi/plugins/platforms),
minimalegl (from /usr/local/qt5pi/plugins/platforms),
offscreen (from /usr/local/qt5pi/plugins/platforms),
vnc (from /usr/local/qt5pi/plugins/platforms),
webgl (from /usr/local/qt5pi/plugins/platforms),
xcb (from /usr/local/qt5pi/plugins/platforms),
eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.
有人经历过吗?我该如何解决?
答案 0 :(得分:0)
由于无法连接到显示器,因此无法加载。如果您说的那样是远程的,那么您是否正在通过X转发使用SSH?您将需要类似的东西。
或者您想要在RPi上显示,那么问题是缺少环境变量。使用printenv查看常规的shell会话。复制DISPLAY,XAUTHORITY以及其他可能在远程调试会话中出现的内容。