无法在 Ubuntu 上打开 Anki

无法在 Ubuntu 上打开 Anki

尝试使用 Anki 2.1.35。尝试打开它时出现以下错误-

    Qt info: Could not load the Qt platform plugin "xcb" in "" even though it was found. 
Qt fatal: 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.
 
Aborted (core dumped)

Anki 2.1.26 运行良好。有什么想法我该怎么做吗?

答案1

我在最新的基于 Qt6 的版本(撰写本文时为 23.10.1)和 Ubuntu 23.10 + LXQT 中遇到了这个问题。

anki从终端启动得到:

Qt info: Could not load the Qt platform plugin "xcb" in "" even though it was found. 
Qt fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

在调试模式下启动应用程序QT_DEBUG_PLUGINS=1 anki会更有帮助:

Qt debug: "/usr/local/share/anki/lib/PyQt6/Qt6/plugins/platforms/libqxcb.so" cannot load: Cannot load library /usr/local/share/anki/lib/PyQt6/Qt6/plugins/platforms/libqxcb.so: (libxcb-cursor.so.0: cannot open shared object file: No such file or directory) 
Qt debug: QLibraryPrivate::loadPlugin failed on "/usr/local/share/anki/lib/PyQt6/Qt6/plugins/platforms/libqxcb.so" : "Cannot load library /usr/local/share/anki/lib/PyQt6/Qt6/plugins/platforms/libqxcb.so: (libxcb-cursor.so.0: cannot open shared object file: No such file or directory)"

安装缺少的库来修复该问题:sudo apt install libxcb-cursor0

相关内容