安装ttf-mscorefonts-installer中出错的原因是需要的文件无法下载。

当ttf-mscorefonts-installer安装遇到文件下载问题时,可以通过手动下载所需字体并放置于特定路径来解决。具体步骤包括从指定网站下载字体文件、创建.done标记文件、确保/tmp/目录干净及使用两个终端窗口同步执行安装命令。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

安装ttf-mscorefonts-installer中出错的原因是需要的文件无法下载。
我们可以事先下载好,在安装ttf-mscorefonts-installer

1. 下载所需的所有的字体,到http://sourceforge.net/projects/corefonts/files/ 下。会有个别不容易下,多尝试几下,下不了的话,看上面有一行英文: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. 先确定/tmp/下没有ttf-mscorefonts-installer开头的目录,如果有的话就先删除掉。删除需在root权限下,切换权限的操作是终端输入 sudo -s -H 然后删除刚才那个目录。删除有内容的目录操作为 终端输入 rm -rf 文件目录名。 
4. 打开2个终端
终端1中输入命令:sudo apt-get install ttf-mscorefonts-installer  不执行。
终端2中输入命令:sudo cp 下载得来的自定的文件目录名/*  /tmp/ttf-mscorefonts-installer  不执行
5. 先执行终端1中的命令,稍等一小会在终端2里面使用tab键,找到ttf-mscorefonts-installer.的一个目录,然后执行该命令。
这样按步骤操作就可以顺利安装所需字体了

(base) lxy@lxy-Legion-Y9000P-IAH7H:~$ sudo add-apt-repository ppa:apt-fast/stable sudo apt update sudo apt install apt-fast [sudo] lxy 的密码: 源: 'deb https://ppa.launchpadcontent.net/apt-fast/stable/ubuntu/ jammy main' 描述: This PPA contains tested (stable) builds of apt-fast. Project: https://github.com/ilikenwf/apt-fast 更多信息:https://launchpad.net/~apt-fast/+archive/ubuntu/stable 正在添加源。 按 [ENTER] 继续,或按 Ctrl-c 取消。 Adding deb entry to /etc/apt/sources.list.d/apt-fast-ubuntu-stable-jammy.list Adding disabled deb-src entry to /etc/apt/sources.list.d/apt-fast-ubuntu-stable-jammy.list Adding key to /etc/apt/trusted.gpg.d/apt-fast-ubuntu-stable.gpg with fingerprint BC5934FD3DEBD4DAEA544F791E2824A7F22B44BD 命中:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy InRelease 获取:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates InRelease [128 kB] 获取:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports InRelease [127 kB] 获取:4 https://dl.google.com/linux/chrome/deb stable InRelease [1,825 B] 获取:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security InRelease [129 kB] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/main amd64 DEP-11 Metadata [114 kB] 错误:4 https://dl.google.com/linux/chrome/deb stable InRelease 由于没有公钥,无法验证下列签名: NO_PUBKEY 32EE5355A6BC6E42 获取:8 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/restricted amd64 DEP-11 Metadata [212 B] 获取:9 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/universe amd64 DEP-11 Metadata [359 kB] 获取:10 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/multiverse amd64 DEP-11 Metadata [940 B] 获取:11 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports/main amd64 DEP-11 Metadata [7,064 B] 获取:12 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports/restricted amd64 DEP-11 Metadata [212 B] 获取:13 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports/universe amd64 DEP-11 Metadata [24.2 kB] 获取:14 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports/multiverse amd64 DEP-11 Metadata [212 B] 获取:15 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security/main amd64 DEP-11 Metadata [54.6 kB] 获取:16 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security/restricted amd64 DEP-11 Metadata [208 B] 获取:17 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security/universe amd64 DEP-11 Metadata [125 kB] 获取:18 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security/multiverse amd64 DEP-11 Metadata [208 B] 命中:6 https://packages.microsoft.com/repos/code stable InRelease 获取:19 https://ppa.launchpadcontent.net/apt-fast/stable/ubuntu jammy InRelease [18.3 kB] 忽略:20 https://deepin-wine.i-m.dev InRelease 获取:21 https://ppa.launchpadcontent.net/apt-fast/stable/ubuntu jammy/main amd64 Packages [536 B] 命中:22 https://deepin-wine.i-m.dev Release 获取:23 https://ppa.launchpadcontent.net/apt-fast/stable/ubuntu jammy/main i386 Packages [536 B] 获取:24 https://ppa.launchpadcontent.net/apt-fast/stable/ubuntu jammy/main Translation-en [272 B] 忽略:25 https://deepin-wine.i-m.dev Release.gpg 已下载 1,090 kB,耗时 3秒 (364 kB/s) 正在读取软件包列表... 完成 W: 校验数字签名时出错。此仓库未被更新,所以仍然使用此前的索引文件。GPG 错误:https://dl.google.com/linux/chrome/deb stable InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 32EE5355A6BC6E42 W: 无法下载 https://dl.google.com/linux/chrome/deb/dists/stable/InRelease 由于没有公钥,无法验证下列签名: NO_PUBKEY 32EE5355A6BC6E42 W: 部分索引文件下载失败。如果忽略它们,那将转而使用旧的索引文件。 命中:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy InRelease 命中:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates InRelease 命中:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports InRelease 命中:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security InRelease 获取:6 https://dl.google.com/linux/chrome/deb stable InRelease [1,825 B] 错误:6 https://dl.google.com/linux/chrome/deb stable InRelease 由于没有公钥,无法验证下列签名: NO_PUBKEY 32EE5355A6BC6E42 命中:5 https://packages.microsoft.com/repos/code stable InRelease 命中:7 https://ppa.launchpadcontent.net/apt-fast/stable/ubuntu jammy InRelease 忽略:8 https://deepin-wine.i-m.dev InRelease 命中:9 https://deepin-wine.i-m.dev Release 忽略:10 https://deepin-wine.i-m.dev Release.gpg 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 有 275 个软件包可以升级。请执行 ‘apt list --upgradable’ 来查看它们。 W: 校验数字签名时出错。此仓库未被更新,所以仍然使用此前的索引文件。GPG 错误:https://dl.google.com/linux/chrome/deb stable InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 32EE5355A6BC6E42 W: 无法下载 https://dl.google.com/linux/chrome/deb/dists/stable/InRelease 由于没有公钥,无法验证下列签名: NO_PUBKEY 32EE5355A6BC6E42 W: 部分索引文件下载失败。如果忽略它们,那将转而使用旧的索引文件。 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: apport-symptoms gdb libbabeltrace1 libboost-regex1.74.0 libc6-dbg libdebuginfod-common libdebuginfod1 libipt2 libsource-highlight-common libsource-highlight4v5 nvidia-firmware-535-535.183.01 python3-systemd 使用'sudo apt autoremove'来卸载它(它们)。 将会同时安装下列软件: aria2 libaria2-0 libc-ares2 libssh2-1 建议安装: aptitude zsh fish 下列【新】软件包将被安装: apt-fast aria2 libaria2-0 libc-ares2 libssh2-1 升级了 0 个软件包,新安装了 5 个软件包,要卸载 0 个软件包,有 275 个软件包未被升级。 需要下载 1,661 kB 的归档。 解压缩后会消耗 5,948 kB 的额外空间。 您希望继续执行吗? [Y/n] y 获取:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/main amd64 libc-ares2 amd64 1.18.1-1ubuntu0.22.04.3 [45.1 kB] 获取:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy/universe amd64 libssh2-1 amd64 1.10.0-3 [109 kB] 获取:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy/universe amd64 libaria2-0 amd64 1.36.0-1 [1,086 kB] 获取:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy/universe amd64 aria2 amd64 1.36.0-1 [381 kB] 获取:5 https://ppa.launchpadcontent.net/apt-fast/stable/ubuntu jammy/main amd64 apt-fast all 1.11.1-1~ubuntu22.04.1 [38.5 kB] 已下载 1,661 kB,耗时 2秒 (1,075 kB/s) 正在预设定软件包 ... 正在选中未选择的软件包 libc-ares2:amd64。 (正在读取数据库 ... 系统当前共安装有 240215 个文件和目录。) 准备解压 .../libc-ares2_1.18.1-1ubuntu0.22.04.3_amd64.deb ... 正在解压 libc-ares2:amd64 (1.18.1-1ubuntu0.22.04.3) ... 正在选中未选择的软件包 libssh2-1:amd64。 准备解压 .../libssh2-1_1.10.0-3_amd64.deb ... 正在解压 libssh2-1:amd64 (1.10.0-3) ... 正在选中未选择的软件包 libaria2-0:amd64。 准备解压 .../libaria2-0_1.36.0-1_amd64.deb ... 正在解压 libaria2-0:amd64 (1.36.0-1) ... 正在选中未选择的软件包 aria2。 准备解压 .../aria2_1.36.0-1_amd64.deb ... 正在解压 aria2 (1.36.0-1) ... 正在选中未选择的软件包 apt-fast。 准备解压 .../apt-fast_1.11.1-1~ubuntu22.04.1_all.deb ... 正在解压 apt-fast (1.11.1-1~ubuntu22.04.1) ... 正在设置 libc-ares2:amd64 (1.18.1-1ubuntu0.22.04.3) ... 正在设置 libssh2-1:amd64 (1.10.0-3) ... 正在设置 libaria2-0:amd64 (1.36.0-1) ... 正在设置 aria2 (1.36.0-1) ... 正在设置 apt-fast (1.11.1-1~ubuntu22.04.1) ... 正在处理用于 man-db (2.10.2-1) 的触发器 ... 正在处理用于 libc-bin (2.35-0ubuntu3.10) 的触发器 ... (base) lxy@lxy-Legion-Y9000P-IAH7H:~$ sudo apt-fast install ttf-mscorefonts-installer 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 ttf-mscorefonts-installer 已经是最新版 (3.8ubuntu2)。 下列软件包是自动安装的并且现在不需要了: apport-symptoms gdb libbabeltrace1 libboost-regex1.74.0 libc6-dbg libdebuginfod-common libdebuginfod1 libipt2 libsource-highlight-common libsource-highlight4v5 nvidia-firmware-535-535.183.01 python3-systemd 使用'sudo apt autoremove'来卸载它(它们)。 升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 275 个软件包未被升级。
07-08
# Use the official Ubuntu base image FROM ubuntu:22.04 WORKDIR /app # 复制本地所有文件(包括 .venv 虚拟环境)到 Docker 内的 /app COPY . /app # Set environment variables to non-interactive to avoid prompts during installation # 设置非交互环境,避免安装时弹提示 ENV DEBIAN_FRONTEND=noninteractive # Update the package list and install necessary packages # 安装系统依赖(必须和本地一致!否则虚拟环境可能报错) RUN apt-get update && \ apt-get install -y \ software-properties-common && \ add-apt-repository ppa:deadsnakes/ppa && \ apt-get update && \ apt-get install -y \ python3.10 \ python3.10-venv \ python3.10-distutils \ python3-pip \ wget \ git \ libgl1 \ libreoffice \ fonts-noto-cjk \ fonts-wqy-zenhei \ fonts-wqy-microhei \ ttf-mscorefonts-installer \ fontconfig \ libglib2.0-0 \ libxrender1 \ libsm6 \ libxext6 \ poppler-utils \ && rm -rf /var/lib/apt/lists/* # Set Python 3.10 as the default python3 # 设置默认 Python 为 3.10(确保系统级 Python 路径正确) RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 # 激活本地复制的 .venv 虚拟环境,验证依赖(可选,构建时检查环境) # Download models and update the configuration file RUN /bin/bash -c "source .venv/bin/activate &&\ pip3 install -U requests -i https://mirrors.aliyun.com/pypi/simple/ &&\ python3 download_models.py " # Set the entry point to activate the virtual environment and run the command line tool # ENTRYPOINT ["/bin/bash", "-c", "source /opt/mineru_venv/bin/activate && exec \"$@\"", "--"] EXPOSE 8889 # 启动命令:激活 .venv 虚拟环境,运行项目 ENTRYPOINT [ "/bin/bash", "-c", "source .venv/bin/avtivate && python app.py" ] CMD ["--host", "0.0.0.0", "--port", "8889"]
06-14
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值