Ubuntu 20.04 LTS 安装ttf-mscorefonts-installer的方法

这篇具有很好参考价值的文章主要介绍了Ubuntu 20.04 LTS 安装ttf-mscorefonts-installer的方法。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

安装报错

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了。

  1. 安装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
  2. 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

重新安装的输出如下:

正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
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模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 英特尔13代桌面CPU平台安装ubuntu20.04LTS记录

    安装环境一: i7-13700K  华硕Z790-P  16X2GB内存   华硕 TUF 3070 O8G 安装环境二: i5-13400    华硕B760M-A D4 8x2GB内存   UHD730核显 安装系统: ubuntu20.04LTS(首先用光驱安装失败,后面用U盘更换ubuntu22.04.2LTS成功) 因为特殊原因,先用光驱安装ubuntu20.04LTS,首先安装很慢很慢,要等半小时进

    2024年02月06日
    浏览(56)
  • 【Ubuntu 20.04LTS系统】安装CUDA11.8、cuDNN,可进行CUDA版本切换

    https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/ 更新软件列表和必要的依赖项 步骤一: 下载CUDA安装包 进行CUDA和cuDNN的选择,也可以直接根据官方推荐进行下载安装。 从Nvidia官网下载CUDA https://developer.nvidia.com/cuda-downloads 下方链接,选择更多版本 https://developer.nvidia.com/cuda-toolkit-archiv

    2024年02月16日
    浏览(51)
  • Ubuntu 20.04 LTS x86_64 安装 stable-diffusion-webui

    Stability AI GitHub - Stability-AI/stablediffusion: High-Resolution Image Synthesis with Latent Diffusion Models https://github.com/AUTOMATIC1111/stable-diffusion-webui Ubuntu 20.04 LTS 安装 nvidia 驱动 + cuda 11.8 从开始到放弃!_hkNaruto的博客-CSDN博客 打开一个新终端,配置源  编辑~/.condarc 内容如下即可。 注意: 以下方

    2024年02月12日
    浏览(38)
  • Ubuntu 20.04 LTS 系统下 安装Nvidia 显卡驱动、CUDA、cuDNN, 并可进行CUDA版本切换

    因为做深度学习的研究项目,为全新机器在Ubuntu 20.04 LTS 系统下 安装Nvidia 显卡驱动、Cuda、Cudnn。并进行CUDA版本切换 成功安装完成了,写个记录。 步骤一: 安装更新软件列表和依赖项 在安装Nvidia显卡驱动之前,需要更新软件列表和必要的依赖项。 步骤二: 查看GPU型号,并

    2024年02月13日
    浏览(50)
  • Ubuntu 20.04 LTS 修改IP地址

    在Ubuntu20.04中,传统的配置/etc/network/interfaces已无效!需要打开 yaml 文件,在 /etc/netplan 文件夹下,不同机器的文件名不一样。通过编辑yaml文件进行配置(一定注意缩进格式),如下: 注意: 这是修改为静态IP的方式,所以上面的 DHCP4:最好改成 FALSE ,防止自动获取IP,导致

    2024年02月02日
    浏览(32)
  • 远程服务器虚拟显示器(Ubuntu 20.04 LTS)

    安装 ssh sever 并开启,确保虚拟显示器配置失败后,无法正常显示,仍可以通过ssh连接至服务器 查看 ssh 服务已经开启,并可以远程 ssh 连接至服务器 测试远程连接 打开配置文件 编辑配置文件 重启服务器 sudo apt-get --purge remove xserver-xorg-core-hwe-18.04 sudo apt-get --purge remove xserve

    2024年02月11日
    浏览(41)
  • 64位Ubuntu20.04.5 LTS系统安装32位运行库

    背景: 在ubutu(版本为20.04.5 LTS)中运行./arm-none-linux-gnueabi-gcc -v 后提示“no such device”。 经多方查证,是ubutu的版本是64位的,而需要运行的编译工具链是32位的,因此会不兼容。 解决方法就是在ubuntu中安装32位的运行环境 如何安装32位的运行环境: 执行以下3条命令: 但是问

    2024年02月07日
    浏览(24)
  • Ubuntu 20.04.4 LTS安装Terminator终端(Linux系统推荐)

    Terminator终端可以在一个窗口中创建多个终端,并且可以水平、垂直分割,运行ROS时很方便。 这样安装完成后,使用快捷键Ctrl + Alt +T打开的就是新安装的terminator终端,可以使用以下方法仍然打开ubuntu默认的终端: 输入以下命令 可以看到有两个终端,/usr/bin/gnome-terminal.wrappe

    2024年02月15日
    浏览(26)
  • Ubuntu 20.04 安装宋体

    环境:         ubuntu 20.04,英文环境,但已经安装中文包 检查ubuntu中安装的中文字体 命令: fc-list :lang=zh 检查ubuntu中安装的所有字体 命令: fc-list 宋体下载: Simsun Font - Free Fonts 网盘分享:链接: https://pan.baidu.com/s/12fSpgkUWuWsh-OU32q1WCA 提取码: wpia 或者从win10上拷贝,但是拷贝的

    2024年02月10日
    浏览(35)
  • Ubuntu20.04 安装jekyll

    首先使根据官方文档安装:Jekyll on Ubuntu | Jekyll • Simple, blog-aware, static sites 如果没有报错,就不用再继续看下去了。 我这边在执行 gem install jekyll bundler 时报错,所以安装了rvm,安装rvm可以参考这篇文章Ubuntu 20.04 安装RVM 在安装完RVM之后,安装对应的ruby版本,并切换至对应版

    2024年02月19日
    浏览(37)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包