无法下载附加数据文件-ttf-mscorefonts-installer。

这是一个旧问题,值得修复,但现在已经超出了玩笑的范畴,我似乎无法解决它。
ttf-mscorefonts-installer 相关的可怕的 failed To download extra data files 错误一直困扰着我。

screenshot1

反复要求它再试一次并没有帮助,而且,多次尝试也没用-
sudo rm -rf /var/lib/update-notifier/package-data-downloads/partial/*
sudo apt-get --purge --reinstall install ttf-mscorefonts-installer

也不管用。我只是从SourceForge的链接中得到至少一个404错误,导致它无法运行。
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 to upgrade, 0 to newly install, 1 reinstalled, 0 to remove and 20 not to upgrade.
Need to get 0 B/29.5 kB of archives.
After this operation, 0 B of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 352049 files and directories currently installed.)
Preparing to unpack .../ttf-mscorefonts-installer_3.4+nmu1ubuntu2_all.deb ...
mscorefonts-eula license has already been accepted
Unpacking ttf-mscorefonts-installer (3.4+nmu1ubuntu2) over (3.4+nmu1ubuntu2) ...
Processing triggers for fontconfig (2.11.94-0ubuntu1.1) ...
Processing triggers for update-notifier-common (3.168.2) ...
ttf-mscorefonts-installer: processing...
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/andale32.exe
Get:1 http://downloads.sourceforge.net/corefonts/andale32.exe [198 kB]
Fetched 198 kB in 0s (339 kB/s)                                                
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)
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/arial32.exe
Get:1 http://downloads.sourceforge.net/corefonts/arial32.exe [554 kB]
Fetched 554 kB in 0s (575 kB/s)                                                
W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/arial32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/arialb32.exe
Get:1 http://downloads.sourceforge.net/corefonts/arialb32.exe [168 kB]
Fetched 168 kB in 0s (306 kB/s)                                                
W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/arialb32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/comic32.exe
Err:1 http://downloads.sourceforge.net/corefonts/comic32.exe
  404  Not Found
W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/comic32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
E: Failed to fetch https://netix.dl.sourceforge.net/project/corefonts/the fonts/final/comic32.exe  404  Not Found

E: Download Failed
Setting up ttf-mscorefonts-installer (3.4+nmu1ubuntu2) ...

具体的下载失败点已经改变 - 这似乎是一个sourceforge的可靠性问题,但这个问题已经持续了几周,并且导致了一直出现令人烦恼的弹窗。
我们如何解决这个问题和/或我现在该如何解决它。

这是一个SourceForge的问题;相关讨论在bug #1607535中。 - Gunnar Hjalmarsson
@Anwar:不是重复问题。链接问题中的答案似乎已经不再适用了。 - user000001
你可以在这里查看我对问题来源的回答: https://askubuntu.com/a/857970/585518 如果下载位置能够正确响应,上述解决方案才能起作用,但目前似乎还不行。链接中解释了如何使用本地下载的文件重新运行软件包。 - Vincent Gerris
2个回答

Launchpad bug #1607535 #1651923 已在 Xenial 和 Yakkety 的“更新”软件源中修复。
如果您使用的是Ubuntu Xenial或更高版本(16.04+),请确保启用了“更新”软件源,并更新软件源信息和软件包:
sudo apt update sudo apt upgrade -f
这将告诉Apt:
1. 升级所有可以被新版本轻松替换的软件包,并且 2. 在此过程中尝试修复所有不一致的软件包(-f选项)。
如果对于您的Ubuntu版本来说,修复的版本不可用,您可以下载Debian版本的ttf-mscorefonts-installer(链接),该版本不会受到此错误的影响,并且可以在软件中心或命令行中安装它(链接)。

1谢谢!对于16.04 LTS来说,安装3.6的deb文件(使用gdebi)似乎是有效的。 :) - Julie Brandon
2不是:ttf-mscorefonts-installer 已经是最新版本了 (3.4+nmu1ubuntu2)。真烦人! - mdesantis
3@mdesantis:是的,就像我说的,Canonical的软件仓库中还没有新版本可用。你有没有继续阅读步骤1之后的内容? - David Foerster
不,我没有注意到第二步:P 无论如何,我使用了这个解决方案 https://bugs.launchpad.net/ubuntu/+source/msttcorefonts/+bug/1607535/comments/17 - mdesantis
1我知道那个解决方法,但我发现它比简单手动安装软件包更困难和脆弱。 - David Foerster
完成这些步骤后,最可靠的方法是如何验证字体是否已安装? - Erel Segal-Halevi
我使用的方法是打开LibreOffice并查看字体是否存在。但这可能需要刷新LibreOffice的另一步骤。 - Erel Segal-Halevi
@ErelSegal-Halevi:如果您有新的问题或后续问题,请打开一个新问题。评论区不适合或用于新问题或延伸讨论。谢谢。 - David Foerster
对我来说,作为一名程序员,测试是编程的重要部分… 答案提供了解决问题的“程序”,所以我认为它应该包括一个确保程序真正有效的测试过程。 - Erel Segal-Halevi
1@ErelSegal-Halevi:简而言之,观察软件包管理器的输出(或者如果你愿意,观察其状态码),最终在已安装字体列表中寻找字体。在基于Unity或Gnome的Ubuntu系统中,默认使用gnome-font-viewer来查看字体。 - David Foerster
@DavidFoerster 请查看Bug #1607535,评论#65。在那里提到Bug #1651923跟踪了该Bug的修复,还提到Bug #1607535实际上是Bug #1651923的一个重复Bug,但该重复标志已被暂时移除。 - lanoxx
我在Yakkety上安装了APT 1.3.4,问题仍然存在。 - Mark Thornton
你是怎么知道-f是一个"修复选项"的?你可以告诉我,你从哪里获取了文档吗?因为在apt upgrade -hman apt中都没有提到键。 - Dmitry Koroliov
当我写这个问题的时候,我发现它已经在这里被问过了。如果你能回答它,请尽管回答。 - Dmitry Koroliov
1@user907860:不错的发现!请参考这个答案,其中引用了一个手册部分,该部分参考了apt-get(8)的手册,后者列出了-f选项。你能否删除你的评论,以减少这个评论区的一些混乱(将光标悬停在它们上面,会显示带有叉号符号的删除按钮)?谢谢。 - David Foerster
请将您的回答转发到重复问题上:https://askubuntu.com/questions/766491/failure-to-download-extra-data-files-with-ttf-mscorefonts-installer-on-ubuntu - Ciro Santilli OurBigBook.com

我曾经遇到同样的问题,在网上找到了一个解决方案,对我有效,其他的“解决方案”都不起作用:

wget http://ftp.de.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.6_all.deb

sudo dpkg -i ttf-mscorefonts-installer_3.6_all.deb

11一般来说,使用gdebi是一个更好的选择,因为它会安装所需的依赖(如果有的话):) - Julie Brandon
15这应该是被接受的答案。 - Joao Carlos
这是关于Debian的情况,但我建议从Ubuntu官网下载Ubuntu系统。 - TorokLev
8@Toroklev:整个Ubuntu都是基于Debian的。正如其他回答所指出的,Ubuntu仓库没有最新版本(只有3.4),所以如果你想解决这个问题,你要么a)等到他们更新,要么b)直接从Debian仓库获取3.6版本并手动安装。 - Scaine
wget 命令返回了一个 404 页面未找到 的错误。 - user3629249
@user3629249 你复制对了吗?我刚试过,它可以正常工作。 - ThisIsNotAnId
我在终端窗口中进行了一次高亮并粘贴操作,使用了鼠标。 - user3629249
@user3629249 我也可以确认链接仍然有效。 - Synergist
4TorokLev,这样做会很好,但Ubuntu总是出问题。不幸的是,在18.04版本中又出现了故障,而Debian软件包仍然运行得非常出色。 - Kendrick
2在18.10和19.04版本中也出现了问题...真的! - jplandrain
1获取最新版本 wget http://ftp.de.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.7_all.deb - Shayan
@JulieBrandon 我使用了gdebi,但仍然无法从sourceforge下载。同时使用dpkg -i也出现了同样的问题。 - Shayan