- @popey Late reply, because my Outlook mailbox marked the forum reply as spam…
First
sudo apt update && sudo apt upgrade -y
sudo apt install gnome-text-editor gimp vlc nautilus x11-apps -y
cd /tmp
sudo apt install libopengl0 libxcb-cursor0 -y
sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin
calibre
x11-apps
is indeed not a default installation option for Ubuntu WSL. Microsoft’s documentation explains this as well.
Second
- But then again, if a person doesn’t know Qt at all, he is likely to do something like this. I don’t actually know much about Qt either…
sudo apt update && sudo apt upgrade -y
cd /tmp
sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin
- Then he will get an error similar to this:
Using python executable: /usr/bin/python3
2024-12-15 16:48:32 URL:https://download.calibre-ebook.com/linux-installer.sh [35050/35050] -> "-" [1]
You are missing the system library libOpenGL.so.0. Try installing packages such as libopengl0
- After searching back and forth on https://packages.ubuntu.com/ several times, the user should know that some additional dependencies are needed.
sudo apt update && sudo apt upgrade -y
cd /tmp
sudo apt install libegl1 libopengl0 libxcb-cursor0 libfontconfig1 libxkbcommon0 libglx0 libnss3 libxcomposite1 libxdamage1 libxrandr2 libxtst6 libxkbfile1 libxcb-xinerama0 -y
sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin
- Then the user will find Qt’s error message, which is not intuitive.
Using python executable: /usr/bin/python3
2024-12-15 16:52:12 URL:https://download.calibre-ebook.com/linux-installer.sh [35050/35050] -> "-" [1]
Installing to /opt/calibre
Downloading tarball signature securely...
Will download and install calibre-7.22.0-x86_64.txz
Downloading calibre-7.22.0-x86_64.txz
100% [========================================================================================================]
Downloaded 183175740 bytes
Checking downloaded file integrity...
Extracting files to /opt/calibre ...
Extracting application files...
Creating symlinks...
Symlinking /opt/calibre/ebook-device to /usr/bin/ebook-device
Symlinking /opt/calibre/ebook-meta to /usr/bin/ebook-meta
Symlinking /opt/calibre/ebook-convert to /usr/bin/ebook-convert
Symlinking /opt/calibre/ebook-polish to /usr/bin/ebook-polish
Symlinking /opt/calibre/markdown-calibre to /usr/bin/markdown-calibre
Symlinking /opt/calibre/web2disk to /usr/bin/web2disk
Symlinking /opt/calibre/calibre-server to /usr/bin/calibre-server
Symlinking /opt/calibre/lrf2lrs to /usr/bin/lrf2lrs
Symlinking /opt/calibre/lrs2lrf to /usr/bin/lrs2lrf
Symlinking /opt/calibre/calibre-debug to /usr/bin/calibre-debug
Symlinking /opt/calibre/calibredb to /usr/bin/calibredb
Symlinking /opt/calibre/calibre-parallel to /usr/bin/calibre-parallel
Symlinking /opt/calibre/calibre-customize to /usr/bin/calibre-customize
Symlinking /opt/calibre/fetch-ebook-metadata to /usr/bin/fetch-ebook-metadata
Symlinking /opt/calibre/calibre-smtp to /usr/bin/calibre-smtp
Symlinking /opt/calibre/calibre to /usr/bin/calibre
Symlinking /opt/calibre/lrfviewer to /usr/bin/lrfviewer
Symlinking /opt/calibre/ebook-viewer to /usr/bin/ebook-viewer
Symlinking /opt/calibre/ebook-edit to /usr/bin/ebook-edit
Setting up command-line completion...
Installing zsh completion to: /usr/share/zsh/vendor-completions/_calibre
Failed to find directory to install bash completions, using default.
Installing bash completion to: /usr/share/bash-completion/completions/
Failed to import PyQt module: PyQt6.QtWebEngineCore with error: libasound.so.2: cannot open shared object file: No such file or directory
____________________ WARNING ____________________
Setting up completion failed with error:
__________________________________________________
Traceback (most recent call last):
File "calibre/linux.py", line 838, in setup_completion
File "calibre/linux.py", line 588, in write_completion
File "bypy-importer.py", line 279, in exec_module
File "calibre/gui2/tweak_book/main.py", line 12, in <module>
File "bypy-importer.py", line 279, in exec_module
File "calibre/ebooks/oeb/polish/check/css.py", line 12, in <module>
ImportError: cannot import name 'QWebEnginePage' from 'qt.webengine' (/opt/calibre/lib/calibre-extensions/python-lib.bypy.frozen/qt/webengine.pyc)
Setting up desktop integration...
____________________ WARNING ____________________
Setting up desktop integration failed with error:
__________________________________________________
Traceback (most recent call last):
File "calibre/linux.py", line 859, in setup_desktop_integration
File "calibre/linux.py", line 881, in do_setup_desktop_integration
File "calibre/linux.py", line 912, in install_xdg_junk
File "calibre/linux.py", line 897, in install_icons
File "calibre/linux.py", line 891, in install_single_icon
File "subprocess.py", line 408, in check_call
File "subprocess.py", line 389, in call
File "subprocess.py", line 1026, in __init__
File "subprocess.py", line 1950, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: 'xdg-icon-resource'
Creating un-installer: /usr/bin/calibre-uninstall
There were 2 warnings
* Setting up completion failed with error:
* Setting up desktop integration failed with error:
Run "calibre" to start calibre
- If the user executes
calibre
at this time, he will get an error message.
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.
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
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: minimalegl, vkkhrdisplay, vnc, wayland, wayland-egl, offscreen, minimal, linuxfb, eglfs, xcb.
Aborted (core dumped)
- This is the origin of the title of this issue – “The xcb QPA platform plugin lacks a
.deb
package similar to build-essential
”.
If so, then we can look deeper. Is the DISPLAY
environment variable set? echo $DISPLAY
Third
- The opinion of the calibre maintainers at Bug #2073474 “Installing Calibre under WSL lacks prompts for dep...” : Bugs : calibre is that Qt, as a common public dependency, should exist as an integrated
.deb
package in the default apt-get repository for distributions including Ubuntu.
- In summary, this is also the origin of this issue. I personally expect that there is a
.deb
package in the apt-get library that can install all Qt-related dependencies at one time.