无法在 Ubuntu 上安装 Win 字体。用户“_apt”无法访问

无法在 Ubuntu 上安装 Win 字体。用户“_apt”无法访问

我正在尝试在 Ubuntu 16.04 上安装 Windows 字体。当我尝试重新安装同一个包时,它说包已安装,但在 LibreOffice 上找不到字体。此外,安装时出现一些错误。

$ sudo apt-get install ttf-mscorefonts-installer
Reading package lists...
Done Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
   ttf-mscorefonts-installer
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/29.5 kB of archives.
After this operation, 134 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package ttf-mscorefonts-installer
(Reading database ... 208570 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) ...
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 5s (35.9 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 4s (124 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 [969 B] Err:1
http://downloads.sourceforge.net/corefonts/arialb32.exe               
Hash Sum mismatch Fetched 969 B in 2s (367 B/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)
E: Failed to fetch http://downloads.sourceforge.net/mirrorproblem?failedmirror=excellmedia.dl.sourceforge.net Hash Sum mismatch
E: Download Failed

设置 ttf-mscorefonts-installer (3.4+nmu1ubuntu2) ..

我跟着这一步。仍然可以看到一些警告 (W),但没有错误 (E)。警告基本上是这样的:

W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/webdin32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

但是按照链接中提到的步骤操作后,我可以看到 Window Font 出现在 LibreOffice 字体选择列表中。

旧的更新信息对话框仍然出现。不确定这是由于旧流程还是由于此流程而出现。

我是否需要采取更多措施,或者一切都很好?

答案1

关于ttf-mscorefonts-安装程序 我想分享一下,因为我在升级到 yakkety 时花了几分钟时间。我遇到了未签署的 EULA、缺乏权限和哈希值不匹配,奇怪的是,这些情况并不是同时发生的。所有问题都已解决:

chown _apt /var/lib/update-notifier/package-data-downloads
chown _apt /var/lib/update-notifier/package-data-downloads/partial
rm /var/lib/update-notifier/package-data-downloads/partial/*
apt install --reinstall ttf-mscorefonts-installer

我不知道哪个软件包维护者拥有解决此问题的密钥。

答案2

这是两件混淆的事情:

“无法放弃权限...”是一个警告,您可以忽略它。该警告后面通常会跟着一个确认文件已下载的消息。

但是,尝试获取arialb32.exe确实失败了(“哈希总和不匹配”)。可能是由于服务器暂时故障所致;您可以通过重新安装重试:

sudo apt install --reinstall ttf-mscorefonts-installer

答案3

正如我在问题中所说的那样以下链接已经解决,但是有一些警告,所以我想得到回复。

对我来说,主要问题是 Firefox。字体看起来很小。Unity Tweet 工具对我来说没什么用。本提示似乎已经奏效。文本看起来更好了。layout.css.devPixelsPerPx文本变得可读性更强。我使用值 = 1.2,而不是建议值 2。

相关内容