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 "", line 3, in <module>
   File "/home/dae/venv/lib/python3.8/site-packages/PyInstaller-4.0.dev0+g2886519-py3.8.egg/PyInstaller/loader/", line 625, in exec_module
   File "aqt/", line 20, in <module>
   File "/home/dae/venv/lib/python3.8/site-packages/PyInstaller-4.0.dev0+g2886519-py3.8.egg/PyInstaller/loader/", line 625, in exec_module
   File "aqt/", line 13, in <module>
 ImportError: /usr/local/share/anki/bin/ version `GNUTLS_3_6_9' not found (required by /lib64/
 [2295] Failed to execute script runanki

Problem in Anki’s and RHEL’s

# Anki
$ strings | grep GNUTLS
# RHEL 8.3 (work well)
$ strings /usr/lib64/ | grep GNUTLS
$ rpm -qf /usr/lib64/
glib2-2.56.4-8.el8.x86_64 # version *-8.*

# RHEL 8.4 (does not work)
$ strings /usr/lib64/ | grep GNUTLS
$ rpm -qf /usr/lib64/
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 

# 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.

dnf downgrade -y glib2-2.56.4-8.el8.x86_64
cp /usr/lib64/ /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)
Exec=sh -c '~/pyenv/bin/anki'

It works for me.