Anki and FreeBSD 7

While playing around on FreeBSD 7.2 at home, I got Anki to work on there without too much issue. The main issue is that the stock install of FreeBSD is missing lot of libraries for Qt4 and Python-qt4 plugins necessary to run it, so most of my time was spent:

  1. Running ./anki from the source repository, taking a note of what library is missing.
  2. Using pkg_add or ports to add the missing libraries. For example: pkg_add -r qt4 py25-qt4-*
  3. Repeat steps 1-2 until Anki runs. Stupid, I know, but it’s the only method that seems to work.

I recall having to do this almost 10 times for missing packages until I had installed enough stuff to make it work. After this, Anki works almost perfectly out of the box, except the terminal flagged frequent errors related to pysqlite versioning. This is a known bug and can be ignored, as stated on the Anki website. I found I had no issues using it despite this error, nor degraded performance.

One other issue to make it work is that time must be synchronized. If not, Anki will refuse to synchronize, so at the very least use ntpdate for a one-off synchronization (which can also be run via /etc/rc.conf at boot-time too), or better yet use ntpd as explained in the FreeBSD official handbook.

Either way, once Anki is running, the interface is identical to other operating systems and free for use. Good luck and happy memorizing!

Update: After all this work, I discovered that Anki is already ported into FreeBSD via the Ports tree! Just go to /usr/ports/games/anki and run make install clean and off you go. This seems to run the latest version of Anki, as well, so someone is actively porting it to FreeBSD. Thank you! :)