hiroi-sora / Umi-OCR

OCR software, free and offline. 开源、免费的离线OCR软件。支持截屏/批量导入图片,PDF文档识别,排除水印/页眉页脚,扫描/生成二维码。内置多国语言库。
MIT License
27.53k stars 2.77k forks source link

please support appimage for linux #696

Open newyorkthink opened 1 month ago

newyorkthink commented 1 month ago

Issues

Expected behavior 预期的功能

appimage file can run it for every distro , and my linux is kali, you program need some depend, but my system nothing more it.

so, please official programer can build it

Thanks you in advance image

Approximate reference (optional) 近似的参考(可选)

No response

hiroi-sora commented 1 month ago

I'm grateful for your suggestion and the error information you provided.

The error indicates a missing xcb library, preventing the QT framework from launching.

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.

On Debian-based systems, you can resolve this by installing the following package:

sudo apt-get install libxcb-xinerama0

For a more detailed troubleshooting method, see below.

Expand 1. Set the environment variable to increase the QT log level: ```sh export QT_DEBUG_PLUGINS=1 ``` 2. Run Umi-OCR to print detailed log information like the following: ```sh Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. QFactoryLoader::QFactoryLoader() checking directory path "/home/my/MyCode/Umi-OCR_Project/Umi-OCR/UmiOCR-data/venv/lib/python3.10/site-packages/PySide2/Qt/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/home/my/MyCode/Umi-OCR_Project/Umi-OCR/UmiOCR-data/venv/lib/python3.10/site-packages/PySide2/Qt/plugins/platforms/libqeglfs.so" Found metadata in lib /home/my/MyCode/Umi-OCR_Project/Umi-OCR/UmiOCR-data/venv/lib/python3.10/site-packages/PySide2/Qt/plugins/platforms/libqeglfs.so, metadata= ``` The logs indicate an issue with the `libqeglfs.so` file. 3. Navigate to the file's location and check its dependencies: ```sh cd /home/my/MyCode/Umi-OCR_Project/Umi-OCR/UmiOCR-data/venv/lib/python3.10/site-packages/PySide2/Qt/plugins/platforms/ ldd libqxcb.so ``` You may find a missing dependency: ``` libxcb-xinerama.so.0 => not found ``` 4. Install the missing dependency: ```sh sudo apt-get install libxcb-xinerama0 ```

After testing, I was able to run the program and use all features on Kali 2023.3 without issues.

In the future, I will consider distributing the application as an AppImage. However, AppImage may not resolve all compatibility and dependency issues.

Thank you again for your support.