![无法在 Win10 WSL2(ubuntu 16.04)上安装 Qt,错误:QStandardPaths:未设置 XDG_RUNTIME_DIR,默认为“/tmp/runtime-root”](https://linux22.com/image/1600189/%E6%97%A0%E6%B3%95%E5%9C%A8%20Win10%20WSL2%EF%BC%88ubuntu%2016.04%EF%BC%89%E4%B8%8A%E5%AE%89%E8%A3%85%20Qt%EF%BC%8C%E9%94%99%E8%AF%AF%EF%BC%9AQStandardPaths%EF%BC%9A%E6%9C%AA%E8%AE%BE%E7%BD%AE%20XDG_RUNTIME_DIR%EF%BC%8C%E9%BB%98%E8%AE%A4%E4%B8%BA%E2%80%9C%2Ftmp%2Fruntime-root%E2%80%9D.png)
当我尝试在 WSL2 ubuntu 上安装 Qt 时,出现以下错误:
root@sun-pc:/mnt/e# ls -l qt*
-rwxrwxrwx 1 sun sun 157714525 May 30 09:51 qt-creator-opensource-linux-x86_64-4.9.1.run
-rwxrwxrwx 1 sun sun 176152456 May 30 09:52 qt-creator-opensource-windows-x86_64-4.9.1.exe
-rwxrwxrwx 1 sun sun 1458369997 Jun 5 11:24 qt-opensource-linux-x64-5.12.3.run
-rwxrwxrwx 1 sun sun 3933849864 Jun 5 11:33 qt-opensource-windows-x86-5.12.3.exe
root@sun-pc:/mnt/e# ./qt-opensource-linux-x64-5.12.3.run
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.
我尝试过解决方案这里但它没有帮助。我该如何解决?谢谢。