Unable to start Anki after installing 2.1.37


Just downloaded anki-2.1.37-linux.tar.bz2 and tried installing as per the instructions on apps.ankiweb.net. Initially, everything seems to go smoothly with the install, but when the process ends, I can’t run anki.

The output looks like this (with the middle cut out):

pinnerup@ergi:~/Downloads$ cd anki-2.1.37-linux/
pinnerup@ergi:~/Downloads/anki-2.1.37-linux$ sudo ./install.sh 
[sudo] password for pinnerup: 
'anki.1' -> '/usr/local/share/anki/anki.1'
'anki.desktop' -> '/usr/local/share/anki/anki.desktop'
'install.sh' -> '/usr/local/share/anki/install.sh'
'README' -> '/usr/local/share/anki/README'
'uninstall.sh' -> '/usr/local/share/anki/uninstall.sh'
Install complete. Type 'anki' to run.
pinnerup@ergi:~/Downloads/anki-2.1.37-linux$ anki
Command 'anki' not found, but can be installed with:
sudo apt install anki

I’m on a standard Ubuntu 20.10.

Works for me - is /usr/local/bin on your path? There should be an ‘anki’ in there which is linked to the real binary.

It is:

pinnerup@ergi:/usr/local/bin$ echo $PATH

But the anki in /usr/local/bin seemingly links to a directory, not to the executable. Could it be that?

pinnerup@ergi:/usr/local/bin$ ls -l /usr/local/bin/ anki
lrwxrwxrwx 1 root root   30 Oct 23 00:28 anki -> /usr/local/share/anki/bin/anki

The executable apparently is /usr/local/share/anki/bin/Anki, whereas /usr/local/share/anki/bin/anki is a directory.

Try removing /usr/local/bin/anki and running the install again. It should be linking to the uppercase name automatically - from the install.sh script:

ln -sf ${PREFIX}/share/anki/bin/Anki ${PREFIX}/bin/anki
1 Like

Thanks, after removing both /usr/local/bin/anki and /usr/local/share/anki and then rerunning install.sh, it works as expected :slight_smile:

1 Like