如何让 ttf-mscorefonts-installer 包下载字体,然后提示已安装?

如何让 ttf-mscorefonts-installer 包下载字体,然后提示已安装?

当我从 14.04 版的软件中心安装“Microsoft TrueType 核心字体安装程序”( ttf-mscorefonts-installer) 时,它会给出肯定的响应——但此后我收到下载错误。似乎实际提供字体的文件从未被检索过。有什么办法可以解决这个问题吗?

答案1

ttf-mscorefonts-installer 包允许轻松安装用于网络的 Microsoft True Type Core Fonts。

运行sudo apt-get install ttf-mscorefonts-installer并接受 EULA,或者如果您已经安装了 ttf-mscorefonts-installer 并且您没有接受 EULA,则卸载 ttf-mscorefonts-installer 并重新安装,如下所示:

sudo dpkg -P ttf-mscorefonts-installer  
sudo apt install ttf-mscorefonts-installer  

使用TabEnter键在弹出的 Microsoft TrueType 核心字体窗口中接受 EULA。每次完成下载新字体时,终端都会输出一条新消息。稍等片刻,直到终端告诉您已完成下载和安装 Microsoft TrueType 核心字体。


正如所指出的软件包 ttf-mscorefonts-installer 3.4+nmu1ubuntu2 安装/升级失败,当前 3.4 版 ttf-mscorefonts-installer 在错误的网络位置搜索字体文件。其结果是核心字体从未安装。自 2016 年 7 月起,Ubuntu 16.04 出现此问题。截至 2017 年 10 月 11 日,Ubuntu 16.10 和 Ubuntu 17.04 中 ttf-mscorefonts-installer 的最新版本也是 3.4,Ubuntu 17.10 中 ttf-mscorefonts-installer 的最新版本是 3.6。

Debian(上游)版本 3.6 的 ttf-mscorefonts-installer 会在正确的网络位置搜索字体文件,并成功安装核心字体。有关此修复的更多信息,请参阅无法下载额外的数据文件 - ttf-mscorefonts-installer

答案2

在软件包修复之前,有一个解决方法:

TMP=`mktemp -d`   
cd $TMP
grep Url: /usr/share/package-data-downloads/ttf-mscorefonts-installer | awk '{print $2}' | xargs -n 1 wget  
sudo /usr/lib/msttcorefonts/update-ms-fonts $TMP/*  
sudo dpkg-reconfigure ttf-mscorefonts-installer  
cd -  
rm -rf $TMP

请注意,这确实会跳过哈希和检查,但它们只是字体,这并不像有人会劫持 download.sourceforge.net DNS 并使用它来分发无效文件。这些文件不会被执行:update-ms-fonts 脚本使用 cabextract 从每个 exe 中提取 TTF 文件。

无论如何,希望这会有所帮助。

答案3

我收到了来自 arial32.exe 包的哈希值错误,安装失败,但通过结合使用上述两种方法,安装确实成功了。

sudo dpkg -P ttf-mscorefonts-installer
sudo rm -rf /var/lib/update-notifier/package-data-downloads/partial/*
sudo apt-get --purge --reinstall install ttf-mscorefonts-installer

答案4

这两个命令对我有用:

sudo rm -rf /var/lib/update-notifier/package-data-downloads/partial/*
sudo apt-get --purge --reinstall install ttf-mscorefonts-installer

来源:https://bugs.launchpad.net/ubuntu/+source/msttcorefonts/+bug/1371783

相关内容