Anki Forums

In RedHat Entreprise Linux 8.4 and derivatives, Anki does not work (bug report)

In RHEL 8.3, anki-2.1.44-linux works well, and in 8.4 it does not work.

 $ anki
 Traceback (most recent call last):
   File "runanki.py", line 3, in <module>
   File "/home/dae/venv/lib/python3.8/site-packages/PyInstaller-4.0.dev0+g2886519-py3.8.egg/PyInstaller/loader/pyimod03_importers.py", line 625, in exec_module
   File "aqt/__init__.py", line 20, in <module>
   File "/home/dae/venv/lib/python3.8/site-packages/PyInstaller-4.0.dev0+g2886519-py3.8.egg/PyInstaller/loader/pyimod03_importers.py", line 625, in exec_module
   File "aqt/qt.py", line 13, in <module>
 ImportError: /usr/local/share/anki/bin/libgnutls.so.30: version `GNUTLS_3_6_9' not found (required by /lib64/libglib-2.0.so.0)
 [2295] Failed to execute script runanki

Problem in Anki’s libgnutls.so.30 and RHEL’s libglib-2.0.so.0.

# Anki
$ strings libgnutls.so.30 | grep GNUTLS
GNUTLS_3_4
 
# RHEL 8.3 (work well)
$ strings /usr/lib64/libglib-2.0.so.0 | grep GNUTLS
GNUTLS_3_4
$ rpm -qf /usr/lib64/libglib-2.0.so.0
glib2-2.56.4-8.el8.x86_64 # version *-8.*

# RHEL 8.4 (does not work)
$ strings /usr/lib64/libglib-2.0.so.0 | grep GNUTLS
GNUTLS_3_4
GNUTLS_3_6_9
$ rpm -qf /usr/lib64/libglib-2.0.so.0
glib2-2.56.4-10.el8_4.x86_64 # version *-10.*

Not desirable solution but works well .

dnf downgrade glib2-2.56.4-8.el8.x86_64
dnf install python3-dnf-plugin-versionlock
dnf versionlock add glib2

By the way, Anki (aqt) works well from PyPI (good temporary solution).

dnf install python38
python3.8 -m venv ~/pyenv
~/pyenv/bin/pip install --upgrade pip
~/pyenv/bin/pip install aqt

# start 
~/pyenv/bin/anki

# update
~/pyenv/bin/pip install --upgrade aqt

I hope the new version of the program from tarball will work correctly. Thank you.

If you copy the older libglib into Anki’s bin folder and then upgrade again, does it run correctly?

Thanks dae!

Now both Anki and the system are working correctly, and it takes only 4 steps to set up.

./install.sh
dnf downgrade -y glib2-2.56.4-8.el8.x86_64
cp /usr/lib64/libglib-2.0.so.0 /usr/local/share/anki/bin/
dnf upgrade -y

I’ll try including libglib in the next beta build, but these library issues can be like a game of whack-a-mole, and I may need to revert it if it breaks things for other users.

1 Like

Maybe add a version with an installation from PyPI to README?
Unfortunately, you can only learn about it from the source tarball.

Apparently, then you will have to add something about the desktop file, such as

[Desktop Entry]
Name=Anki (aqt)
Type=Application
Exec=sh -c '~/pyenv/bin/anki'
Icon=/absolute/path/to/your/icon.png

It works for me.