CLion with WSL try to 运行 QT application (xcb 无法加载)
CLion with WSL try to run QT application (xcb can not be loaded)
我正在尝试 运行 来自此处 https://github.com/vt4a2h/uml-tool 的代码,但我发现自己遇到了这个错误消息:
qt.qpa.xcb: could not connect to display
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.
我正在使用 windows 10 和 WSL 2 (Ubuntu 20.04.2 LTS)
我试过的:
- sudo apt-get install -y xserver-xorg xinit
- sudo apt-get install -y mesa-utils libegl1-mesa libegl1-mesa-dev libgbm-dev libgbm1 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
- /etc/X11/xorg.conf ---> -bash: /etc/X11/xorg.conf: 没有那个文件或目录
- sudo Xorg -configure
X.Org X Server 1.20.9
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.15.0-130-generic x86_64 Ubuntu
Current Operating System: Linux NB-CJ-U4-5336 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64
Kernel command line: initrd=\initrd.img panic=-1 pty.legacy_count=0 nr_cpus=12
Build Date: 17 January 2021 09:13:31AM
xorg-server 2:1.20.9-2ubuntu1.2~20.04.1 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.38.4
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Mar 16 17:32:21 2021
List of video drivers:
amdgpu
ati
intel
nouveau
qxl
radeon
vmware
modesetting
fbdev
vesa
No devices to configure. Configuration failed.
(EE) Server terminated with error (2). Closing log file.
- sudo apt-get install --reinstall libxcb-xinerama0
- 出口QT_DEBUG_PLUGINS=1
我还尝试将以下内容添加到环境中:
QT_DEBUG_PLUGINS=1
QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/
XAUTHORITY=~/.Xauthority
我的新错误信息是:
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/x86_64-linux-gnu/qt5/plugins" ...
QFactoryLoader::QFactoryLoader() checking directory path "/mnt/c/MyPrograms/uml-tool/cmake-build-debug" ...
QFactoryLoader::QFactoryLoader() looking at "/mnt/c/MyPrograms/uml-tool/cmake-build-debug/cmake_install.cmake"
QElfParser: '/mnt/c/MyPrograms/uml-tool/cmake-build-debug/cmake_install.cmake' is not an ELF object
"'/mnt/c/MyPrograms/uml-tool/cmake-build-debug/cmake_install.cmake' is not an ELF object"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "/mnt/c/MyPrograms/uml-tool/cmake-build-debug/CMakeCache.txt"
QElfParser: '/mnt/c/MyPrograms/uml-tool/cmake-build-debug/CMakeCache.txt' is not an ELF object
"'/mnt/c/MyPrograms/uml-tool/cmake-build-debug/CMakeCache.txt' is not an ELF object"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "/mnt/c/MyPrograms/uml-tool/cmake-build-debug/Makefile"
QElfParser: '/mnt/c/MyPrograms/uml-tool/cmake-build-debug/Makefile' is not an ELF object
"'/mnt/c/MyPrograms/uml-tool/cmake-build-debug/Makefile' is not an ELF object"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "/mnt/c/MyPrograms/uml-tool/cmake-build-debug/uml-tool"
"Failed to extract plugin meta data from '/mnt/c/MyPrograms/uml-tool/cmake-build-debug/uml-tool'"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "/mnt/c/MyPrograms/uml-tool/cmake-build-debug/UmlTool.cbp"
QElfParser: '/mnt/c/MyPrograms/uml-tool/cmake-build-debug/UmlTool.cbp' is not an ELF object
"'/mnt/c/MyPrograms/uml-tool/cmake-build-debug/UmlTool.cbp' is not an ELF object"
not a plugin
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms/libqeglfs.so"
Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms/libqlinuxfb.so"
Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms/libqminimal.so"
Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms/libqminimalegl.so"
Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms/libqoffscreen.so"
Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms/libqvnc.so"
Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms/libqxcb.so"
Got keys from plugin meta data ("xcb")
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"
Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so"
Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so"
Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so"
Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so"
Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so"
Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/mnt/c/MyPrograms/uml-tool/cmake-build-debug/platforms" ...
loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
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/lib/x86_64-linux-gnu/qt5/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/lib/x86_64-linux-gnu/qt5/plugins/platforms/), linuxfb (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), minimal (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), minimalegl (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), offscreen (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), vnc (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), xcb (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
Process finished with exit code 134
上面的所有命令都是 运行 来自 ubuntu console
我该怎么办?我该如何解决这个问题?
您需要一个 X11 服务器。 “WSL X11”的第一个 Google 结果是 https://virtualizationreview.com/articles/2017/02/08/graphical-programs-on-windows-subsystem-on-linux.aspx 表示:
To use WSL with graphical programs, an X server will need to be installed on the Windows 10 system and the DISPLAY variable will need to be set in Bash. Fortunately, there are many X servers that run on Windows; some of the more popular free ones are Xming, Cygwin X, and vcXsrv.
上面的文章还包含一些关于如何启动 X11 服务器和测试它是否工作的更多说明。
我正在尝试 运行 来自此处 https://github.com/vt4a2h/uml-tool 的代码,但我发现自己遇到了这个错误消息:
qt.qpa.xcb: could not connect to display
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.
我正在使用 windows 10 和 WSL 2 (Ubuntu 20.04.2 LTS)
我试过的:
- sudo apt-get install -y xserver-xorg xinit
- sudo apt-get install -y mesa-utils libegl1-mesa libegl1-mesa-dev libgbm-dev libgbm1 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
- /etc/X11/xorg.conf ---> -bash: /etc/X11/xorg.conf: 没有那个文件或目录
- sudo Xorg -configure
X.Org X Server 1.20.9
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.15.0-130-generic x86_64 Ubuntu
Current Operating System: Linux NB-CJ-U4-5336 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64
Kernel command line: initrd=\initrd.img panic=-1 pty.legacy_count=0 nr_cpus=12
Build Date: 17 January 2021 09:13:31AM
xorg-server 2:1.20.9-2ubuntu1.2~20.04.1 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.38.4
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Mar 16 17:32:21 2021
List of video drivers:
amdgpu
ati
intel
nouveau
qxl
radeon
vmware
modesetting
fbdev
vesa
No devices to configure. Configuration failed.
(EE) Server terminated with error (2). Closing log file.
- sudo apt-get install --reinstall libxcb-xinerama0
- 出口QT_DEBUG_PLUGINS=1
我还尝试将以下内容添加到环境中:
QT_DEBUG_PLUGINS=1
QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/
XAUTHORITY=~/.Xauthority
我的新错误信息是:
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/x86_64-linux-gnu/qt5/plugins" ...
QFactoryLoader::QFactoryLoader() checking directory path "/mnt/c/MyPrograms/uml-tool/cmake-build-debug" ...
QFactoryLoader::QFactoryLoader() looking at "/mnt/c/MyPrograms/uml-tool/cmake-build-debug/cmake_install.cmake"
QElfParser: '/mnt/c/MyPrograms/uml-tool/cmake-build-debug/cmake_install.cmake' is not an ELF object
"'/mnt/c/MyPrograms/uml-tool/cmake-build-debug/cmake_install.cmake' is not an ELF object"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "/mnt/c/MyPrograms/uml-tool/cmake-build-debug/CMakeCache.txt"
QElfParser: '/mnt/c/MyPrograms/uml-tool/cmake-build-debug/CMakeCache.txt' is not an ELF object
"'/mnt/c/MyPrograms/uml-tool/cmake-build-debug/CMakeCache.txt' is not an ELF object"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "/mnt/c/MyPrograms/uml-tool/cmake-build-debug/Makefile"
QElfParser: '/mnt/c/MyPrograms/uml-tool/cmake-build-debug/Makefile' is not an ELF object
"'/mnt/c/MyPrograms/uml-tool/cmake-build-debug/Makefile' is not an ELF object"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "/mnt/c/MyPrograms/uml-tool/cmake-build-debug/uml-tool"
"Failed to extract plugin meta data from '/mnt/c/MyPrograms/uml-tool/cmake-build-debug/uml-tool'"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "/mnt/c/MyPrograms/uml-tool/cmake-build-debug/UmlTool.cbp"
QElfParser: '/mnt/c/MyPrograms/uml-tool/cmake-build-debug/UmlTool.cbp' is not an ELF object
"'/mnt/c/MyPrograms/uml-tool/cmake-build-debug/UmlTool.cbp' is not an ELF object"
not a plugin
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms/libqeglfs.so"
Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms/libqlinuxfb.so"
Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms/libqminimal.so"
Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms/libqminimalegl.so"
Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms/libqoffscreen.so"
Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms/libqvnc.so"
Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/platforms/libqxcb.so"
Got keys from plugin meta data ("xcb")
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"
Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so"
Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so"
Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so"
Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so"
Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so"
Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/mnt/c/MyPrograms/uml-tool/cmake-build-debug/platforms" ...
loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
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/lib/x86_64-linux-gnu/qt5/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/lib/x86_64-linux-gnu/qt5/plugins/platforms/), linuxfb (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), minimal (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), minimalegl (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), offscreen (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), vnc (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), xcb (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
Process finished with exit code 134
上面的所有命令都是 运行 来自 ubuntu console
我该怎么办?我该如何解决这个问题?
您需要一个 X11 服务器。 “WSL X11”的第一个 Google 结果是 https://virtualizationreview.com/articles/2017/02/08/graphical-programs-on-windows-subsystem-on-linux.aspx 表示:
To use WSL with graphical programs, an X server will need to be installed on the Windows 10 system and the DISPLAY variable will need to be set in Bash. Fortunately, there are many X servers that run on Windows; some of the more popular free ones are Xming, Cygwin X, and vcXsrv.
上面的文章还包含一些关于如何启动 X11 服务器和测试它是否工作的更多说明。