如题,在无桌面环境的Linux下启动骰娘,出现
2022-11-20 12:53:25 W/MiraiNative: java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
尝试过设置set DISPLAY=:0.0
, 出现
2022-11-20 10:29:00 W/MiraiNative: java.awt.AWTError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
2022-11-20 10:29:00 W/MiraiNative: java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit
尝试搜索stackoverflow, 无果, 在github上发现iTXTech/mirai-native#22, 其中作者提到mirai-native不支持linux, 故不提供支持
docker直接一键式搭建也会出现同样的错误
尝试搭建的服务器为centos 7,uname -a
输出如下
Linux ECS733 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
同样我在有桌面环境的Arch Linux下进行了测试可以初始化, 但是如果使用ctrl+alt+f2跳出tty环境也会出现相同的错误
Arch Linux的uname -a
输出如下
Linux crystal 6.0.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 16 Nov 2022 17:01:17 +0000 x86_64 GNU/Linux
但更奇怪的是,以前的Linux的服务器上似乎可以直接搭建,但现在不可以了