我正在尝试使用适用于 Linux 的 Windows 子系统的 Mobaxterm 在 gnuplot 上绘制某些内容。我安装了 QT 包和 gnuplot 等,并能够成功绘制我想要的内容。在我关闭 PC 并于第二天重新打开以绘制同一张图表后,我收到此错误
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/gnuplot/platforms" ... loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so" qt.qpa.xcb: could not connect to display via:0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this
问题。
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
导出 QT_DEBUG_PLUGINS=1然后显示
> > Got keys from plugin meta data ("minimalegl") QFactoryLoader::QFactoryLoader() looking at
> "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so"
> Found metadata in lib
> /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so,
> metadata= {
> "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
> "MetaData": {
> "Keys": [
> "offscreen"
> ]
> },
> "archreq": 0,
> "className": "QOffscreenIntegrationPlugin",
> "debug": false,
> "version": 330752 }
>
>
> Got keys from plugin meta data ("offscreen")
> QFactoryLoader::QFactoryLoader() looking at
> "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so" Found
> metadata in lib
> /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so, metadata=
> {
> "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
> "MetaData": {
> "Keys": [
> "vnc"
> ]
> },
> "archreq": 0,
> "className": "QVncIntegrationPlugin",
> "debug": false,
> "version": 330752 }
>
>
> Got keys from plugin meta data ("vnc")
> QFactoryLoader::QFactoryLoader() looking at
> "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so" Found
> metadata in lib
> /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata=
> {
> "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
> "MetaData": {
> "Keys": [
> "xcb"
> ]
> },
> "archreq": 0,
> "className": "QXcbIntegrationPlugin",
> "debug": false,
> "version": 330752 }
>
>
> Got keys from plugin meta data ("xcb")
> QFactoryLoader::QFactoryLoader() checking directory path
> "/usr/lib/gnuplot/platforms" ... loaded library
> "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
> qt.qpa.xcb: could not connect to display via:0 qt.qpa.plugin: Could
> not load the Qt platform plugin "xcb" in "" 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, linuxfb, minimal, minimalegl,
> offscreen, vnc, xcb.
>
> Could not connect to existing gnuplot_qt. Starting a new one.
> QFactoryLoader::QFactoryLoader() checking directory path
> "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms" ...
> QFactoryLoader::QFactoryLoader() looking at
> "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so" Found
> metadata in lib
> /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so,
> metadata= {
> "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
> "MetaData": {
> "Keys": [
> "eglfs"
> ]
> },
> "archreq": 0,
> "className": "QEglFSIntegrationPlugin",
> "debug": false,
> "version": 330752 }
>
>
> Got keys from plugin meta data ("eglfs")
> QFactoryLoader::QFactoryLoader() looking at
> "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so" Found
> metadata in lib
> /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so,
> metadata= {
> "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
> "MetaData": {
> "Keys": [
> "linuxfb"
> ]
> },
> "archreq": 0,
> "className": "QLinuxFbIntegrationPlugin",
> "debug": false,
> "version": 330752 }
>
>
> Got keys from plugin meta data ("linuxfb")
> QFactoryLoader::QFactoryLoader() looking at
> "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so" Found
> metadata in lib
> /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so,
> metadata= {
> "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
> "MetaData": {
> "Keys": [
> "minimal"
> ]
> },
> "archreq": 0,
> "className": "QMinimalIntegrationPlugin",
> "debug": false,
> "version": 330752 }
>
>
> Got keys from plugin meta data ("minimal")
> QFactoryLoader::QFactoryLoader() looking at
> "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so"
> Found metadata in lib
> /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so,
> metadata= {
> "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
> "MetaData": {
> "Keys": [
> "minimalegl"
> ]
> },
> "archreq": 0,
> "className": "QMinimalEglIntegrationPlugin",
> "debug": false,
> "version": 330752 }
>
>
> Got keys from plugin meta data ("minimalegl")
> QFactoryLoader::QFactoryLoader() looking at
> "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so"
> Found metadata in lib
> /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so,
> metadata= {
> "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
> "MetaData": {
> "Keys": [
> "offscreen"
> ]
> },
> "archreq": 0,
> "className": "QOffscreenIntegrationPlugin",
> "debug": false,
> "version": 330752 }
>
>
> Got keys from plugin meta data ("offscreen")
> QFactoryLoader::QFactoryLoader() looking at
> "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so" Found
> metadata in lib
> /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so, metadata=
> {
> "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
> "MetaData": {
> "Keys": [
> "vnc"
> ]
> },
> "archreq": 0,
> "className": "QVncIntegrationPlugin",
> "debug": false,
> "version": 330752 }
>
>
> Got keys from plugin meta data ("vnc")
> QFactoryLoader::QFactoryLoader() looking at
> "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so" Found
> metadata in lib
> /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata=
> {
> "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
> "MetaData": {
> "Keys": [
> "xcb"
> ]
> },
> "archreq": 0,
> "className": "QXcbIntegrationPlugin",
> "debug": false,
> "version": 330752 }
>
>
> Got keys from plugin meta data ("xcb")
> QFactoryLoader::QFactoryLoader() checking directory path
> "/usr/lib/gnuplot/platforms" ... loaded library
> "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
> qt.qpa.xcb: could not connect to display via:0 qt.qpa.plugin: Could
> not load the Qt platform plugin "xcb" in "" 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, linuxfb, minimal, minimalegl,
> offscreen, vnc, xcb.
我尝试过该论坛提供的许多方法,但都没有任何帮助。
谁能告诉我该怎么做才能解决这个问题?
谢谢