这些是终端上显示的问题:
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)
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 相关。
答案1
解决问题的方法是手动安装(@rag2):
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
细节: https://gist.github.com/melvincabatuan/26f3ac4ace4be3a8b48d85a1b3250982
很遗憾,以下答案对我来说不起作用(在 Ubuntu 16.04 中)。
sudo rm -rf /var/lib/update-notifier/package-data-downloads/partial/*
sudo apt-get --purge --reinstall install ttf-mscorefonts-installer
结果:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
ubuntu-core-launcher
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 34 not upgraded.
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 ... 286132 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.3) ...
ttf-mscorefonts-installer: processing...
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/andale32.exe
Get:1 http://downloads.sourceforge.net/corefonts/andale32.exe [361 B]
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://ncu.dl.sourceforge.net/project/corefonts/the fonts/final/andale32.exe 404 Not Found
E: Download Failed
Setting up ttf-mscorefonts-installer (3.4+nmu1ubuntu2) ...
答案2
这是错误报告sourceforge.org
在启动板上。导致该错误的原因是安装程序没有正确处理 http 重定向。
这作者报告提供了两种解决方法,并附有详细的演练:
- 一种是从 debian 网站挑选 v3.6,如其他答案中提到的那样。
- 另一种是从 sourceforge 手动下载所需的文件,
wget
它可以很好地处理重定向,然后dpkg-reconfigure
在询问时运行并指定包含下载文件的目录。
创建临时目录并下载字体:
mkdir /tmp/mscoref
cd /tmp/mscoref
wget http://downloads.sourceforge.net/corefonts/{andale32.exe,arial32.exe,arialb32.exe,comic32.exe,courie32.exe,georgi32.exe,impact32.exe,times32.exe,trebuc32.exe,verdan32.exe,webdin32.exe}
然后清除失败的包
sudo apt-get purge ttf-mscorefonts-installer
重新安装软件包并忽略可能的错误:
sudo apt-get install ttf-mscorefonts-installer
最后:
sudo dpkg-reconfigure ttf-mscorefonts-installer
这将导致出现以下消息:
按enter
;在框中输入下载文件的路径(注意:.
这里对我来说不起作用):
然后再次按下enter
。
现在字体安装顺利了:
....
Extracting cabinet: /tmp/mscoref/webdin32.exe
extracting fontinst.exe
extracting Webdings.TTF
extracting fontinst.inf
extracting Licen.TXT
All done, no errors.
All fonts downloaded and installed.
所有功劳都应该归功于来自 launchpad 的 robingape
答案3
ttf-mscorefonts-installer 的 3.4 版本目前已损坏。Debian 存储库中的 3.6 版本运行良好。您可以相应地下载并安装该软件包(从而修复上述错误):
wget http://ftp.us.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.6_all.deb
sudo dpkg -i ttf-mscorefonts-installer_3.6_all.deb
备选区域存储库位于https://packages.debian.org/sid/all/ttf-mscorefonts-installer/download。
这为我修复了上面提到的错误。
答案4
使用此命令来修复问题:
sudo rm -rf /var/lib/update-notifier/package-data-downloads/partial/*
sudo apt-get --purge --reinstall install ttf-mscorefonts-installer\
在这里查看其他解决方案:如何让 ttf-mscorefonts-installer 包下载字体,然后提示已安装?