MCSLTeam / MCSL2

MCSL2 | 一个简洁全能的Minecraft开服器
https://mcsl.com.cn
GNU General Public License v3.0
390 stars 41 forks source link

BUG | 非Wayland桌面环境有概率无法运行 #11

Closed FTS427 closed 1 year ago

FTS427 commented 1 year ago

问题描述

可以Linux平台上运行吗?(我用的Archlinux) 如果可以,需要什么编译环境?(Python+Qt?) 可以打包至Archlinux的AUR上吗?

LxHTT commented 1 year ago

https://github.com/LxHTT/MCSL2/actions/runs/4448025212 请查看此处的版本能否正常运行。

FTS427 commented 1 year ago

"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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb." 我似乎必须用wayland桌面。。。

LxHTT commented 1 year ago

比较悲哀( 我看后期能不能适配一下

FTS427 commented 1 year ago

On 2023年3月20日星期一 HKT 下午10:06:36 落雪无痕LxHTT wrote:

比较悲哀( 我看后期能不能适配一下 行吧,也谢谢你啦

LxHTT commented 1 year ago

请尝试在程序同目录下新建platform文件夹并在其中放置
libQt5XcbQpa.so
libQt5Core.so
libQt5Gui.so
libQt5Network.so
libQt5Widgets.so
libQt5DBus.so
libicuuc.so
libicudata.so
libicui18n.so
libqxcb.so


(文件自行百度XD) 配置完后,再次尝试运行。注意,请使用 https://github.com/LxHTT/MCSL2/actions/runs/4448025212 的程序。


若仍然不行,请设置系统环境变量
export QT_DEBUG_PLUGINS=1
然后通过命令行运行本程序,并将输出的信息回复给我。

LxHTT commented 1 year ago

请在终端中执行export QT_QPA_PLATFORM=wayland 并且回车,再运行程序即可。

LxHTT commented 1 year ago

No. It cannot run normally on Manjaro Linux Gnome right now. But I can still run it on Ubuntu....

FTS427 commented 1 year ago

我是Archlinux + KDE + Xorg11。。。

LxHTT commented 1 year ago

显然在KDE桌面环境上可以正常工作。 我现在在用了上面的解决方案之后,运行,给出了以下报错:

Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" 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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
FTS427 commented 1 year ago

我去试试

FTS427 commented 1 year ago

确实有问题。。。



``` 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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
FTS427 commented 1 year ago

可以用了,作者大大

FTS427 commented 1 year ago

你检查一下你的Release的打包,应该是打包有问题,而非程序自身引起。 我是直接拉的源码,之后按照README文档里安装依赖后用“python MCSL2.py”命令运行,可以正常运行

LxHTT commented 1 year ago

此功能已经整合入 https://github.com/LxHTT/MCSL2/commit/e7115a87f719b94f2b7994cc4b366ccce05a2070
通过直接设置环境变量达到效果

FTS427 commented 1 year ago