5

How to install Microsoft fonts on Ubuntu 16.10? I tried with $ sudo apt install ttf-mscorefonts-installer but unsuccessfully. Here is the screenshot:

$ sudo apt install ttf-mscorefonts-installer
...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libc++1 libjemalloc1 linux-headers-4.8.0-26 linux-headers-4.8.0-26-generic
  linux-headers-4.8.0-27 linux-headers-4.8.0-27-generic
  linux-image-4.8.0-26-generic linux-image-4.8.0-27-generic
  linux-image-extra-4.8.0-26-generic linux-image-extra-4.8.0-27-generic
  linux-signed-image-4.8.0-26-generic linux-signed-image-4.8.0-27-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  cabextract libmspack0
The following NEW packages will be installed:
  cabextract libmspack0 ttf-mscorefonts-installer
0 upgraded, 3 newly installed, 0 to remove and 86 not upgraded.
Need to get 89,2 kB of archives.
After this operation, 362 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://nl.archive.ubuntu.com/ubuntu yakkety/main amd64 libmspack0 amd64 0.5-1 [38,2 kB]
Get:2 http://nl.archive.ubuntu.com/ubuntu yakkety/universe amd64 cabextract amd64 1.6-1 [21,4 kB]
Get:3 http://nl.archive.ubuntu.com/ubuntu yakkety/multiverse amd64 ttf-mscorefonts-installer all 3.4+nmu1ubuntu2 [29,5 kB]
Fetched 89,2 kB in 0s (577 kB/s)                   
Preconfiguring packages ...
Selecting previously unselected package libmspack0:amd64.
(Reading database ... 321446 files and directories currently installed.)
Preparing to unpack .../0-libmspack0_0.5-1_amd64.deb ...
Unpacking libmspack0:amd64 (0.5-1) ...
Selecting previously unselected package cabextract.
Preparing to unpack .../1-cabextract_1.6-1_amd64.deb ...
Unpacking cabextract (1.6-1) ...
Selecting previously unselected package ttf-mscorefonts-installer.
Preparing to unpack .../2-ttf-mscorefonts-installer_3.4+nmu1ubuntu2_all.deb ...
Unpacking ttf-mscorefonts-installer (3.4+nmu1ubuntu2) ...
Setting up libmspack0:amd64 (0.5-1) ...
Processing triggers for update-notifier-common (3.175) ...
ttf-mscorefonts-installer: processing...
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/andale32.exe
Err:1 http://downloads.sourceforge.net/corefonts/andale32.exe
  404  Not Found
W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/andale32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
E: Failed to fetch https://downloads.sourceforge.net/project/corefonts/the?download&failedmirror=heanet.dl.sourceforge.net  404  Not Found
E: Download Failed
Setting up cabextract (1.6-1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up ttf-mscorefonts-installer (3.4+nmu1ubuntu2) ...
Processing triggers for fontconfig (2.11.94-0ubuntu2) ...
Processing triggers for libc-bin (2.24-3ubuntu1) ...
  • See if one of these answers (maybe the second one?) helps you: askubuntu.com/questions/463754/… – WinEunuuchs2Unix Dec 18 '16 at 17:57
  • 4
    Please don't post screenshots of text. Copy the text here and apply code formatting, instead. – muru Dec 18 '16 at 17:59
  • Adding to muru's request your screenshot is missing the command that led to the errors. It would have appeared had sudo's password not been typed incorrectly. – WinEunuuchs2Unix Dec 18 '16 at 18:03
3

The fonts are no longer located at http://downloads.sourceforge.net/corefonts/ and that's why you're getting a 404 error. They are now at https://sourceforge.net/projects/corefonts/files/the%20fonts/final/.

edit: You could probably download the fonts you need at the new directory that I list, and then uncompress the .exe files to get the fonts, and then move the fonts into the ~/.fonts folder.

If you don't have a .fonts directory, create one by typing mkdir ~/.fonts from the terminal application.

You can also find all the Ubuntu-compatible fonts that your heart desires at http://fonts.google.com.

Download the font(s) you like, uncompress them, and move them into the .fonts folder in your home directory.

  • 1
    Those files are meant to be the in the .exe format. I'm not sure how, but the postinstall script extracts the fonts from them. That's how these fonts have been installed on Ubuntu for years. – muru Dec 18 '16 at 18:26
  • @muru but it also seems that they've moved the fonts to a new location. – heynnema Dec 18 '16 at 18:26
  • That may be, but the files being .exe is not (or should not, anyway) be a problem. – muru Dec 18 '16 at 18:27
  • @muru ok... I'll edit that out... the installer will still fail with a 404 error due to the directory change. – heynnema Dec 18 '16 at 18:28
  • @heynnema I will try with Wine. I will install LibreOffice and MS Fonts in Wine. – Danijel Gomola Dec 18 '16 at 18:35
2

It is a permissions error for user "_apt". Please do ...

sudo chown _apt:root /var/lib/update-notifier/package-data-downloads/partial/
sudo rm /var/lib/update-notifier/package-data-downloads/partial/*.FAILED
sudo apt install --reinstall update-notifier-common

The 2nd line might error out if there are no files ending in ".FAILED". The 3rd command will install the fonts.

sudo apt install ttf-mscorefonts-installer

will then show ...

Reading package lists... Done
Building dependency tree       
Reading state information... Done
ttf-mscorefonts-installer is already the newest version (3.4+nmu1ubuntu2).
  • That didn't help me. I will try to install LibreOffice and Microsoft Fonts in Wine. – Danijel Gomola Dec 18 '16 at 18:31
1

You hit bug #1607535. The workaround is to download and install ttf-mscorefonts-installer from Debian.

1

I download fonts from https://sourceforge.net/projects/corefonts/files/the%20fonts/final/ and with 7z command I extract .exe files and make a .fonts directory in /home directory where I moved extracted files. Now in LibreOffice I see fonts like Times New Roman. Thanks everybody for help.

Not the answer you're looking for? Browse other questions tagged or ask your own question.