How to install the package ttf-mscorefonts-installer

Just run the installer by:

sudo apt install ttf-mscorefonts-installer

To accept the license simply press Tab key until the 'O.k.' is highlighted and then Return.

In some cases the package ttf-mscorefonts-installer fails to install properly with a message:

E: Failed to fetch http://downloads.sourceforge.net/corefonts/arial32.exe HttpError400

In this case after the install finished do the following:

Create a temporary directory and navigate into it:

TMP=$(mktemp -d)
cd "$TMP"

After that you can use the following command to download all the fonts from their sourceforge location:

awk '/Url/ {system("wget "$2)}' /usr/share/package-data-downloads/ttf-mscorefonts-installer

Now run the updater to install them finally:

sudo /usr/lib/msttcorefonts/update-ms-fonts "$TMP"/*

All left to do now is to clear out the file telling the system that the install was incomplete.

sudo touch /var/lib/update-notifier/package-data-downloads/ttf-mscorefonts-installer

And wrap up behind you, navigating out of the temporary directory and removing it:

cd ..
rm -r "$TMP"

In some cases you need to reboot to get the fonts recognized.

Tested and needed on Ubuntu 15.10, 16.04, 16.10, 17.04, 17.10 and 18.04!


The packages comes with a post-install script (that is, literally a script that is executed after the package has been installed), which automatically downloads the fonts from Microsoft.

They should already be installed on your system, right after you have Accepted the end-user license agreement.

You can find the fonts in /usr/share/fonts/truetype/msttcorefonts/. You may (I'm really not sure) need to refresh the font-cache so that applications can use them, or maybe the script has done that for you. The easiest way to make sure everything is up to date is to reboot your computer.

If the folder /usr/share/fonts/truetype/msttcorefonts/ is empty try to use the command sudo apt-get install --reinstall ttf-mscorefonts-installer and agree the license


You can install in a noninteractive mode the packages via command line:

DEBIAN_FRONTEND noninteractive
RUN apt-get install -y fontconfig    
RUN apt-get install -y ttf-mscorefonts-installer