[Bug 1607535] Re: ttf-mscorefonts-installer 3.4+nmu1ubuntu2 fails to install core fonts
Nathanaël Naeri
1607535 at bugs.launchpad.net
Sat Jan 14 01:54:07 UTC 2017
Robin, comment 63:
> This package comes originally from Debian, where the current
> version is 3.6. That version seems to work without problem,
> no matter how ugly it may be in doing so.
As a matter of fact, even Debian's version 3.4 works. It works because
it uses wget to download the fonts, while Ubuntu's version of the
package uses apt-helper, which has a bug, see comments 50 52 by Adrien
Beau, and the bug 1655431 he links to, which points to the root cause in
bug 1651923.
So it's not a case of "version 3.4 is broken, version 3.6 fixes the
problem" but a case of "Ubuntu versions of the package are broken,
Debian versions of the package work".
I do not know why the Ubuntu package was modified in the first place,
rather than simply copied from Debian (and I personally wish there were
less delta between the two distributions, to avoid these Ubuntu-only
bugs). Perhaps we can find out the reasons in the changelog for the
Ubuntu package.
> An update to the existing 3.6 code would
> provide a clean solution
Yes and no. On the one hand, using Debian's 3.6 package as-is certainly
works, as mentionned in this thread.
But the Ubuntu package cannot be updated to pure Debian 3.6 without
losing the Ubuntu-specific changes. So the changes made in Debian
between 3.4 and 3.6 should instead be merged to the Ubuntu package, for
it to benefit from both the features of the new version and the Ubuntu-
specific changes.
Since one of these Ubuntu-specific changes is using apt-helper instead
of wget, the bug would remain.
> problem which, as you will have noticed,
> affects a very large number of people
It affects me too.
> Unless someone is going actively to develop and test an updated
> package which resolves the problems with version 3.4
Someone is: Julian Klode, see bug 1651923, of which this bug is a
duplicate (although I am going to temporarily remove duplicate status,
see this bug, comments 56 57).
Julian has already released a fix, available in Ubuntu's upcoming 17.04
release, as is the correct procedure. Fixes aren't released directly to
production releases, they are first tested in the development release,
in case they don't work or cause new bugs.
If you can use the development release, please test this package and
report in bug 1651923. Feedback will be appreciated and will help the
fix to be backported to the production releases.
> (As a point of information, this bug also appears with 14.04.)
Crap. I was quite sure it was specific to 16.06 and 16.10. Can you give
more details? In bug 1651923, bottom of comment 24, Julian Klode
mentions that there is a different issue with the downloads on Trusty
(14.04). Can you confirm whether you are running into this different
issue (download hangs) or the issue discussed in this bug (download
fails)?
** This bug is no longer a duplicate of bug 1651923
apt https method decodes redirect locations and sends them to the destination undecoded.
** Tags removed: upgrade-software-version
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to msttcorefonts in Ubuntu.
https://bugs.launchpad.net/bugs/1607535
Title:
ttf-mscorefonts-installer 3.4+nmu1ubuntu2 fails to install core fonts
Status in msttcorefonts package in Ubuntu:
In Progress
Bug description:
[Symptoms]
When installing or updating the package ttf-mscorefonts-installer in
Ubuntu 16.04 or 16.10, an error message appears in a GUI window,
indicating "failure to download extra data files" (the fonts
themselves) "after package installation" (the package itself appears
to have been installed). This error message re-appears regularly, as a
cron-job re-tries the failed download.
If installing or updating from the command line, additional failure
information is given in an error message prefixed by "E:", but this
error message depends on the mirror server which is contacted for the
download: "404 Not Found" is common, but there is also "Protocol http
not supported or disabled in libcurl", and complains about invalid
Content-Range headers.
[Cause]
The current 3.4 version of ttf-mscorefonts-installer in Ubuntu 16.04
delegates the download of the proprietary Microsoft Core Fonts for the
Web (Andale, Arial...) to the package update-notifier, which itself
delegates it to the program apt-helper provided by the package apt.
The download URL points to the host downloads.sourceforge.net, which
redirects to a randomly-chosen mirror server
<mirror>.dl.sourceforge.net.
Unfortunately, the program apt-helper has a bug in the way it treats
redirections. This bug makes apt-helper keep a space in the URL
instead of encoding it to %20 before contacting the mirror. It is more
extensively documented in bug 1655431 and bug 1651923. The mirror
replies to this malformed request with an error message (e.g. "404 Not
Found"), and download fails.
Some mirrors appear to understand the malformed request nonetheless,
and send the requested font file, however since there are 11 fonts to
download, the chances of getting 11 understanding mirrors are low.
Hence why the error message usually concerns andale32.exe or
arial32.exe instead of webdin32.exe.
[Workaround 1]
Download the fonts manually and put them all in the same directory.
You can use wget for that, because contrary to apt-helper, it handles
redirections fine (command line formatted for readability, do not
include line breaks and line indents):
$ wget http://downloads.sourceforge.net/corefonts/
{andale32.exe,arial32.exe,arialb32.exe,comic32.exe,courie32.exe,
georgi32.exe,impact32.exe,times32.exe,trebuc32.exe,verdan32.exe,
webdin32.exe}
Or you can use your browser: point it to
https://sourceforge.net/projects/corefonts/files/the%20fonts/final and
download the same files.
Make sure the package is purged and no remaining setup triggers are
remaining, using your favorite package manager or command-line APT:
$ sudo apt-get purge ttf-mscorefonts-installer
Then reinstall the package, this time pointing to the previously-
downloaded fonts in a second step:
$ sudo apt-get install ttf-mscorefonts-installer
# (this will most likely fail again)
$ sudo dpkg-reconfigure ttf-mscorefonts-installer
The second command should return a "graphical" interface in the
terminal. Use it to point to the directory where you downloaded the
fonts (/path/to/directory/containing/the/fonts). Make sure no .deb
files are in this directory, they seem to be picked up too and then it
fails.
If a pop-up shows up for a post-install action later, just let it run,
it shouldn't come back. It may triggered by the file /var/lib/update-
notifier/user.d/data-downloads-failed and you may be successful in
avoiding the regularly-reappearing message by removing this file. But
this point is less clear.
Once everything is working, you can delete the downloaded fonts in
.exe format, they have been uncompressed and installed in
/usr/share/fonts/truetype/msttcorefonts in .ttf format.
Adapted from: Vincent Gerris (comment 17), Lesley Binks (comment 18).
[Workaround 2]
Remove Ubuntu's version of ttf-mscorefonts-installer and install
Debian's version instead. Indeed, Debian's version uses wget to
download the fonts, and contrary to apt-helper, wget handles
redirections fine.
Download the package from https://packages.debian.org/ttf-mscorefonts-
installer. Version 3.6 has been tested by several users. This
workaround should work with Debian's version 3.4+nmu1 too, but then
you'd be prompted to update to Ubuntu's problematic version
3.4+nmu1ubuntu2 next time you update your packages.
To download the package with wget (command line formatted for
readability, do not include line break and line indent):
$ wget http://httpredir.debian.org/debian/pool/contrib/m/
msttcorefonts/ttf-mscorefonts-installer_3.6_all.deb
Purge your currently-installed Ubuntu version of the package using
your favorite package manager or command-line APT, and install the
Debian version with dpkg:
$ sudo apt-get purge ttf-mscorefonts-installer
$ sudo dpkg --install /path/to/ttf-mscorefonts-installer_3.6_all.deb
You should keep the deb-file around, so when this bug is fixed in
Ubuntu 16.04 and 16.10, you can uninstall Debian's version of the
package and go back to Ubuntu's version:
$ sudo dpkg --purge /path/to/ttf-mscorefonts-installer_3.6_all.deb
$ sudo apt-get install ttf-mscorefonts-installer
Adapted from: yas (comment 19), Richard Elkins (comment 40)
[Fix]
The bug was fixed by Julian Klode in version 1.4~beta3ubuntu1 of
package apt for the upcoming 17.04 release, see bug 1651923 comments
24 25. If everything works fine in the development release, Julian may
backport his fix to the previous 16.04 and 16.10 releases, but this
process currently takes a few weeks to a few months.
Subscribe to this bug and bug 1651923 to follow on the progress.
This bug used to be a duplicate of bug 1651923, but was temporarily
de-duplicated to hopefully make it easier for people to find it,
instead of reporting the issue as a new bug. Otherwise, duplicates are
hidden.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/msttcorefonts/+bug/1607535/+subscriptions
More information about the foundations-bugs
mailing list