Google Roboto Fonts - 由于冲突无法安装

Google Roboto Fonts - 由于冲突无法安装

在新的 16.04 最低安装中,Google 的 Roboto 字体不会显示在 Chrome 中。

当我尝试安装字体时,我收到一条conflicts... 消息。有什么解决方法吗?

one@laptop:~$ sudo apt-get install fonts-roboto*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'fonts-roboto-fontface' for glob 'fonts-roboto*'
Note, selecting 'fonts-roboto-hinted' for glob 'fonts-roboto*'
Note, selecting 'fonts-roboto' for glob 'fonts-roboto*'
Note, selecting 'fonts-roboto-unhinted' for glob 'fonts-roboto*'
fonts-roboto is already the newest version (2:0~20160106-1).
fonts-roboto-hinted is already the newest version (2:0~20160106-1).
fonts-roboto-hinted set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 fonts-roboto-hinted : Conflicts: fonts-roboto-unhinted but 2:0~20160106-1 is to be installed
 fonts-roboto-unhinted : Conflicts: fonts-roboto-hinted but 2:0~20160106-1 is to be installed
                         Conflicts: fonts-roboto-hinted:i386
E: Unable to correct problems, you have held broken packages.
one@laptop:~$ 

答案1

这是 16.04 的一个错误,在 17.10 中不存在。我刚刚提交了一个错误报告并上传了修复程序,大约几周后就可以修复了。

编辑:

现在已修复:

https://launchpad.net/ubuntu/+source/fonts-roboto/2:0~20160106-1ubuntu0.1

答案2

让我们分析一下 apt-get 告诉我们的内容:

  • fonts-roboto 已安装且为最新版本。
  • fonts-roboto-hinted 已安装,且为最新版本。它之前已随另一个软件包自动安装,因此现在 apt-get 将其更改为“手动安装”,因为您明确要求安装它。
  • 未安装 fonts-roboto-unhinted,因为它与 fonts-roboto-hinted 冲突
  • fonts-roboto-fontface 未安装。除了被选中之外,我没有在输出中看到它被列出。

在我的研究中,我发现了 Debian(Ubuntu 所基于的发行版)上 fonts-roboto 的错误报告:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838199
该错误报告是关于 fonts-roboto-hinted 和 fonts-roboto-unhinted 软件包冲突的。在报告中,一名开发人员表示他已在软件包版本 fonts-roboto 2:0~20160106-2 中修复了该问题

我不确定处理这种“虚假”冲突的好方法,因为如果您手动安装这两个软件包,我认为 apt-get 会抱怨冲突并且不会对此感到高兴。这也可能导致升级失败。也许有更多知识的人可以谈谈如何解决这种情况。

你可能想要运行:

sudo apt-get install fonts-roboto-fontface

因为我不认为它被安装并且我不认为它会发生冲突。

答案3

如果其他答案对您没有帮助,您可以按照以下方法手动安装它们,保证有效:

  1. 从以下位置下载 roboto-master.zip这里
  2. 提取文件
  3. roboto-master/src/提示在提取的文件中
  4. 将所有 TTF 文件复制到/home/$USER/.local/share/fonts

相关内容