I'm trying to get LaTeX working on Anki. I am the only admin on my system but when I try and run the terminal command "tlmgr update --self && tlmgr install dvipng" I get an error saying I need to run the program as an admin. I am the admin! How do I run this program?

PS: Due to lack of reputation, I am unable to vote or bump any existing material, so I am asking a new question. The comment to the linked top answer below is identical to my query, hence the identical text.


PPS: Crossposted from Apple StackExchange because I wasn't sure which forum was more suitable.

1 Answer 1



Anki’s LaTeX support is not turn-key: it is assumed that you know how to use LaTeX already, and that you have it installed. If you have no experience with LaTeX, please consult one of the many guides available on the internet. If you are having trouble with markup, please ask on a LaTeX forum.

To install LaTeX, on Windows use MiKTeX; on OSX use MacTex, and on Linux use your distro’s package manager. Dvipng must also be installed.

Note On Windows, go to Settings in MikTek’s maintenance window, and make sure "Install missing packages on the fly" is set to "No", not to "Ask me first". If you continue to have difficulties, one user reported that running Anki as an administrator until all the packages were fetched helped.

Note On OSX, LaTeX has only been tested with MacTex and BasicTex. If you use BasicTex, you need to install dvipng separately, with the following command:

sudo tlmgr update --self; sudo tlmgr install dvipng

The command may not be on the path, so you may need to provide the full path, eg /usr/local/texlive/2014basic/bin/x86_64-darwin/tlmgr.

Note If you are not using the above LaTeX packages, you will need to use the "edit LaTeX" add-on to specify the full path to latex and dvipng.

Superuser access needed, not just admin.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .