On Debian running natively the script works fine. On Debian running in WSL1 I get the trace below. Some searching around lead me to this bug report for WSL regarding shared libraries.
https://github.com/Microsoft/WSL/issues/3023
Sure enough, the distributed libQt6Core.so.6 include the magic "for GNU/Linux 3.17.0" string. Stripping the .note.ABI-tag from the library makes it work.
Code:
[xyz: ~]$ ./calibre.sh
2022-09-16 16:03:32 URL:https://download.calibre-ebook.com/linux-installer.sh [33493/33493] -> "-" [1]
Using python executable: /usr/bin/python3
Installing to /opt/calibre
Downloading tarball signature securely...
Using previously downloaded calibre-6.5.0-x86_64.txz
Extracting files to /opt/calibre ...
Extracting application files...
Failed to import PyQt module: PyQt6.QtCore with error: libQt6Core.so.6: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "runpy.py", line 196, in _run_module_as_main
File "runpy.py", line 86, in _run_code
File "site.py", line 45, in <module>
File "site.py", line 39, in main
File "bypy-importer.py", line 279, in exec_module
File "calibre/linux.py", line 12, in <module>
File "bypy-importer.py", line 279, in exec_module
File "calibre/customize/ui.py", line 17, in <module>
File "bypy-importer.py", line 279, in exec_module
File "calibre/customize/builtins.py", line 704, in <module>
File "bypy-importer.py", line 279, in exec_module
File "calibre/devices/kindle/driver.py", line 5, in <module>
File "bypy-importer.py", line 279, in exec_module
File "calibre/devices/kindle/apnx.py", line 20, in <module>
File "bypy-importer.py", line 279, in exec_module
File "calibre/devices/kindle/apnx_page_generator/generators/accurate_page_generator.py", line 7, in <module>
File "bypy-importer.py", line 279, in exec_module
File "calibre/devices/kindle/apnx_page_generator/generators/fast_page_generator.py", line 7, in <module>
File "bypy-importer.py", line 279, in exec_module
File "calibre/devices/kindle/apnx_page_generator/i_page_generator.py", line 10, in <module>
File "bypy-importer.py", line 279, in exec_module
File "calibre/ebooks/mobi/reader/mobi6.py", line 27, in <module>
File "bypy-importer.py", line 279, in exec_module
File "calibre/utils/img.py", line 13, in <module>
ImportError: cannot import name 'QBuffer' from 'qt.core' (/opt/calibre/lib/calibre-extensions/python-lib.bypy.frozen/qt/core.pyc)
Run "calibre" to start calibre
[xyz: ~]$