如何在 Ubuntu 16.10 上安装 Microsoft 字体?我尝试过$ sudo apt install ttf-mscorefonts-installer
但没有成功。以下是屏幕截图:
$ sudo apt install ttf-mscorefonts-installer
...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libc++1 libjemalloc1 linux-headers-4.8.0-26 linux-headers-4.8.0-26-generic
linux-headers-4.8.0-27 linux-headers-4.8.0-27-generic
linux-image-4.8.0-26-generic linux-image-4.8.0-27-generic
linux-image-extra-4.8.0-26-generic linux-image-extra-4.8.0-27-generic
linux-signed-image-4.8.0-26-generic linux-signed-image-4.8.0-27-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
cabextract libmspack0
The following NEW packages will be installed:
cabextract libmspack0 ttf-mscorefonts-installer
0 upgraded, 3 newly installed, 0 to remove and 86 not upgraded.
Need to get 89,2 kB of archives.
After this operation, 362 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://nl.archive.ubuntu.com/ubuntu yakkety/main amd64 libmspack0 amd64 0.5-1 [38,2 kB]
Get:2 http://nl.archive.ubuntu.com/ubuntu yakkety/universe amd64 cabextract amd64 1.6-1 [21,4 kB]
Get:3 http://nl.archive.ubuntu.com/ubuntu yakkety/multiverse amd64 ttf-mscorefonts-installer all 3.4+nmu1ubuntu2 [29,5 kB]
Fetched 89,2 kB in 0s (577 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libmspack0:amd64.
(Reading database ... 321446 files and directories currently installed.)
Preparing to unpack .../0-libmspack0_0.5-1_amd64.deb ...
Unpacking libmspack0:amd64 (0.5-1) ...
Selecting previously unselected package cabextract.
Preparing to unpack .../1-cabextract_1.6-1_amd64.deb ...
Unpacking cabextract (1.6-1) ...
Selecting previously unselected package ttf-mscorefonts-installer.
Preparing to unpack .../2-ttf-mscorefonts-installer_3.4+nmu1ubuntu2_all.deb ...
Unpacking ttf-mscorefonts-installer (3.4+nmu1ubuntu2) ...
Setting up libmspack0:amd64 (0.5-1) ...
Processing triggers for update-notifier-common (3.175) ...
ttf-mscorefonts-installer: processing...
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/andale32.exe
Err:1 http://downloads.sourceforge.net/corefonts/andale32.exe
404 Not Found
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)
E: Failed to fetch https://downloads.sourceforge.net/project/corefonts/the?download&failedmirror=heanet.dl.sourceforge.net 404 Not Found
E: Download Failed
Setting up cabextract (1.6-1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up ttf-mscorefonts-installer (3.4+nmu1ubuntu2) ...
Processing triggers for fontconfig (2.11.94-0ubuntu2) ...
Processing triggers for libc-bin (2.24-3ubuntu1) ...
答案1
字体不再位于http://downloads.sourceforge.net/corefonts/这就是你收到 404 错误的原因。他们现在位于https://sourceforge.net/projects/corefonts/files/the%20fonts/final/。
编辑:您可以在我列出的新目录中下载所需的字体,然后解压缩 .exe 文件以获取字体,然后将字体移动到 ~/.fonts 文件夹中。
如果您没有 .fonts 目录,请通过mkdir ~/.fonts
从应用程序中键入来创建一个terminal
。
您还可以在以下网址找到您想要的所有与 Ubuntu 兼容的字体:http://fonts.google.com。
下载您喜欢的字体,解压缩,然后将其移动到主目录中的 .fonts 文件夹中。
答案2
这是用户“_apt”的权限错误。请执行...
sudo chown _apt:root /var/lib/update-notifier/package-data-downloads/partial/
sudo rm /var/lib/update-notifier/package-data-downloads/partial/*.FAILED
sudo apt install --reinstall update-notifier-common
如果没有以“.FAILED”结尾的文件,则第二行可能会出错。第三条命令将安装字体。
sudo apt install ttf-mscorefonts-installer
然后将显示...
Reading package lists... Done
Building dependency tree
Reading state information... Done
ttf-mscorefonts-installer is already the newest version (3.4+nmu1ubuntu2).
答案3
你击中错误 #1607535。解决方法是ttf-mscorefonts-installer
从Debian。
答案4
我从https://sourceforge.net/projects/corefonts/files/the%20fonts/final/使用 7z 命令,我提取了 .exe 文件,并在 /home 目录中创建了一个 .fonts 目录,我将提取的文件移动到该目录中。现在在 LibreOffice 中,我可以看到 Times New Roman 之类的字体。感谢大家的帮助。