安装报错
user_name:~$ sudo apt install ttf-mscorefonts-installer
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列【新】软件包将被安装:
ttf-mscorefonts-installer
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 0 B/25.1 kB 的归档。
解压缩后会消耗 93.2 kB 的额外空间。
正在预设定软件包 ...
正在选中未选择的软件包 ttf-mscorefonts-installer。
(正在读取数据库 ... 系统当前共安装有 202865 个文件和目录。)
准备解压 .../ttf-mscorefonts-installer_3.7ubuntu6_all.deb ...
mscorefonts-eula license has already been accepted
正在解压 ttf-mscorefonts-installer (3.7ubuntu6) ...
正在设置 ttf-mscorefonts-installer (3.7ubuntu6) ...
正在处理用于 update-notifier-common (3.192.30.14) 的触发器 ...
ttf-mscorefonts-installer: processing...
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/andale32.exe
/usr/lib/update-notifier/package-data-downloader:185: DeprecationWarning: apt_pkg.sha256sum is deprecated, use apt_pkg.Hashes
real_sha256 = apt_pkg.sha256sum(dest_file_obj)
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/arial32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/arialb32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/comic32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/courie32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/georgi32.exe
获取:1 http://downloads.sourceforge.net/corefonts/georgi32.exe [1,027 B]
错误:1 http://downloads.sourceforge.net/corefonts/georgi32.exe
Hash 校验和不符
Hashes of expected file:
- SHA256:2c2c7dcda6606ea5cf08918fb7cd3f3359e9e84338dc690013f20cd42e930301
Hashes of received file:
- SHA256:77285a6bf6b12684a8b38ea7d2850e7be9f0c8102101f4eb74b92cc08a5f023d
- Filesize:1027 [weak]
Last modification reported: Thu, 02 Feb 2023 11:41:26 +0000
已下载 1,027 B,耗时 3秒 (357 B/s)
E: 无法下载 http://downloads.sourceforge.net/mirrorproblem?failedmirror=udomain.dl.sourceforge.net Hash 校验和不符
Hashes of expected file:
- SHA256:2c2c7dcda6606ea5cf08918fb7cd3f3359e9e84338dc690013f20cd42e930301
Hashes of received file:
- SHA256:77285a6bf6b12684a8b38ea7d2850e7be9f0c8102101f4eb74b92cc08a5f023d
- Filesize:1027 [weak]
Last modification reported: Thu, 02 Feb 2023 11:41:26 +0000
E: 下载失败
Traceback (most recent call last):
File "/usr/lib/update-notifier/package-data-downloader", line 351, in <module>
process_download_requests()
File "/usr/lib/update-notifier/package-data-downloader", line 345, in process_download_requests
trigger_update_notifier(our_failures)
File "/usr/lib/update-notifier/package-data-downloader", line 156, in trigger_update_notifier
string.Template(input).substitute(
File "/usr/lib/python3.8/string.py", line 126, in substitute
return self.pattern.sub(convert, self.template)
File "/usr/lib/python3.8/string.py", line 119, in convert
return str(mapping[named])
KeyError: 'pecynnau'
dpkg: 处理软件包 update-notifier-common (--configure)时出错:
已安装 update-notifier-common 软件包 post-installation 脚本 子进程返回错误状态 1
正在处理用于 fontconfig (2.13.1-2ubuntu3) 的触发器 ...
在处理时有错误发生:
update-notifier-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
失败的解决方法
试了如下两种方法,都不行。对方法1修改了一下OK了。
- 安装ttf-mscorefonts-installer中出错的原因是需要的文件无法下载安装ttf-mscorefonts-installer中出错的原因是需要的文件无法下载。我们可以事先下载好,在安装ttf-mscorefonts-installer1. 下载所需的所有的字体,到http://sourceforge.net/projects/corefonts/files/ 下。会有个别不容易下,多尝试几下,下不了的话,看上面有一行英文:Problems with https://blog.csdn.net/u014114046/article/details/52167594?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-1-52167594-blog-122847811.pc_relevant_default&spm=1001.2101.3001.4242.2&utm_relevant_index=4
- ubuntu 安装ttf-mscorefonts-installer网上给出的常见方法:sudo apt-get --purge --reinstall install ttf-mscorefonts-installer运行之后/usr/share/fonts/truetype/msttcorefonts目录是空的,并没有成功。还有一种方式是在Microsoft's TrueType core fonts - Browse Files at SourceForge.net这个网站下载字体,然后:1、打开2个终端终端1中输入命令:sudo ..._1671465600https://blog.csdn.net/whuzhang16/article/details/122847811
具体如下(第1-2步是上面提到的方法1的前两步):
1. 下载所需的所有的字体,到 Microsoft's TrueType core fonts - Browse Files at SourceForge.net 下。会有个别不容易下,多尝试几下,下不了的话,看上面有一行英文:Problems with the download? Please use this direct link or try another mirror. 你点mirror 换个镜像再试试。列表如下:
andale32.exe
arial32.exe
arialb32.exe
comic32.exe
courie32.exe
georgi32.exe
impact32.exe
times32.exe
trebuc32.exe
verdan32.exe
wd97vwr32.exe
webdin32.exe
2. 将上面的十二个文件保存到一个目录,目录名字自定。
将上面的所有的文件再复制一份,名称是原文件名称后面加一个.done,如:arial32.exe——》arial32.exe.done。这样你自定的文件目录里就有24个文件了。
3. 从这一步开始就不一样了。因为安装过程中没有生成ttf-mscorefonts-installer.文件夹,所以要查下文件被下载到哪里去了。
# 查找已下载文件中的一个即可
user_name:/$ sudo find -name verdan32.exe
[sudo] user_name 的密码:
./var/lib/update-notifier/package-data-downloads/partial/verdan32.exe
find: ‘./run/user/1000/doc’: 权限不够
find: ‘./run/user/1000/gvfs’: 权限不够
./home/user_name/download/Microsoft_TrueType_core_fonts/verdan32.exe
# 提升权限
user_name:/$ sudo -i
# 进到上面查到的目录中(第1条)
root:~# cd /var/lib/update-notifier/package-data-downloads/partial/
# 查看已下载的字体文件
root:~# ls
ndale32.exe arial32.exe arialb32.exe.FAILED
courie32.exe georgi32.exe.FAILED times32.exe
verdan32.exe andale32.exe.FAILED arialb32.exe
comic32.exe georgi32.exe impact32.exe
trebuc32.exe webdin32.exe.FAILED
# 将第1-2步的24个文件复制过来
root:~# cp /home/lyl/download/Microsoft_TrueType_core_fonts/* .
# 删除*.FAILED文件
root:~# rm *.FAILED
# 重新切换回user_name账户
root:~# su lyl
# 重新安装ttf-mscorefonts-installer
user_name:/$ sudo apt-get install ttf-mscorefonts-installer
重新安装的输出如下:文章来源:https://www.toymoban.com/news/detail-444207.html
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
ttf-mscorefonts-installer 已经是最新版 (3.7ubuntu6)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
有 1 个软件包没有被完全安装或卸载。
解压缩后会消耗 0 B 的额外空间。
您希望继续执行吗? [Y/n] Y
正在设置 update-notifier-common (3.192.30.14) ...
ttf-mscorefonts-installer: processing...
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/andale32.exe
/usr/lib/update-notifier/package-data-downloader:185: DeprecationWarning: apt_pkg.sha256sum is deprecated, use apt_pkg.Hashes
real_sha256 = apt_pkg.sha256sum(dest_file_obj)
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/arial32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/arialb32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/comic32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/courie32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/georgi32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/impact32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/times32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/trebuc32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/verdan32.exe
ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/webdin32.exe
These fonts were provided by Microsoft "in the interest of cross-
platform compatibility". This is no longer the case, but they are
still available from third parties.
You are free to download these fonts and use them for your own use,
but you may not redistribute them in modified form, including changes
to the file name or packaging format.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/andale32.exe
extracting fontinst.inf
extracting andale.inf
extracting fontinst.exe
extracting AndaleMo.TTF
extracting ADVPACK.DLL
extracting W95INF32.DLL
extracting W95INF16.DLL
All done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/arial32.exe
extracting FONTINST.EXE
extracting fontinst.inf
extracting Ariali.TTF
extracting Arialbd.TTF
extracting Arialbi.TTF
extracting Arial.TTF
All done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/arialb32.exe
extracting fontinst.exe
extracting fontinst.inf
extracting AriBlk.TTF
All done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/comic32.exe
extracting fontinst.inf
extracting Comicbd.TTF
extracting Comic.TTF
extracting fontinst.exe
All done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/courie32.exe
extracting cour.ttf
extracting courbd.ttf
extracting courbi.ttf
extracting fontinst.inf
extracting couri.ttf
extracting fontinst.exe
All done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/georgi32.exe
extracting fontinst.inf
extracting Georgiaz.TTF
extracting Georgiab.TTF
extracting Georgiai.TTF
extracting Georgia.TTF
extracting fontinst.exe
All done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/impact32.exe
extracting fontinst.exe
extracting Impact.TTF
extracting fontinst.inf
All done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/times32.exe
extracting fontinst.inf
extracting Times.TTF
extracting Timesbd.TTF
extracting Timesbi.TTF
extracting Timesi.TTF
extracting FONTINST.EXE
All done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/trebuc32.exe
extracting FONTINST.EXE
extracting trebuc.ttf
extracting Trebucbd.ttf
extracting trebucbi.ttf
extracting trebucit.ttf
extracting fontinst.inf
All done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/verdan32.exe
extracting fontinst.exe
extracting fontinst.inf
extracting Verdanab.TTF
extracting Verdanai.TTF
extracting Verdanaz.TTF
extracting Verdana.TTF
All done, no errors.
Extracting cabinet: /var/lib/update-notifier/package-data-downloads/partial/webdin32.exe
extracting fontinst.exe
extracting Webdings.TTF
extracting fontinst.inf
extracting Licen.TXT
All done, no errors.
All fonts downloaded and installed.
至此,完美解决了Ubuntu 20.04 LTS下安装微软truetype字体的问题了。文章来源地址https://www.toymoban.com/news/detail-444207.html
到了这里,关于Ubuntu 20.04 LTS 安装ttf-mscorefonts-installer的方法的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!