![在 Ubuntu 20.04 命令行 Windows 10 shell 上安装‘apt install texlive-full’时遇到的错误](https://linux22.com/image/936390/%E5%9C%A8%20Ubuntu%2020.04%20%E5%91%BD%E4%BB%A4%E8%A1%8C%20Windows%2010%20shell%20%E4%B8%8A%E5%AE%89%E8%A3%85%E2%80%98apt%20install%20texlive-full%E2%80%99%E6%97%B6%E9%81%87%E5%88%B0%E7%9A%84%E9%94%99%E8%AF%AF.png)
我已经安装了适用于 Linux 2 Ubuntu 20.04 命令行 shell 的 Windows 10 子系统。
当我运行时sudo apt install texlive-full
出现以下错误:
After this operation, 5609 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 libosp5 amd64 1.5.2-13ubuntu3 [652 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal/universe amd64 libostyle1c2 amd64 1.4devel1-21.3ubuntu1 [615 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal/main amd64 libpackage-stash-xs-perl amd64 0.29-1build1 [18.4 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal/universe amd64 libperlio-utf8-strict-perl amd64 0.007-2build2 [11.1 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal/universe amd64 libplot2c2 amd64 2.6-10build1 [506 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal/universe amd64 libqt5xml5 amd64 5.12.8+dfsg-0ubuntu1 [105 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal/universe amd64 libpoppler-qt5-1 amd64 0.86.1-0ubuntu1 [150 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal/universe amd64 libzip5 amd64 1.5.1-0ubuntu1 [46.7 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal/universe amd64 libpstoedit0c2a amd64 3.75-1build1 [370 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal/main amd64 libref-util-perl all 0.204-1 [15.0 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal/main amd64 libref-util-xs-perl amd64 0.117-1build2 [12.0 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal/main amd64 libtcl8.6 amd64 8.6.10+dfsg-1 [902 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal/universe amd64 libtext-unidecode-perl all 1.30-1 [99.0 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal/main amd64 libxss1 amd64 1:1.2.3-1 [8140 B]
Get:15 http://archive.ubuntu.com/ubuntu focal/main amd64 libtk8.6 amd64 8.6.10-1 [714 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal/main amd64 libwacom-bin amd64 1.3-2ubuntu1 [5484 B]
Get:17 http://archive.ubuntu.com/ubuntu focal/main amd64 libxml-sax-expat-perl all 0.51-1 [10.5 kB]
Get:18 http://archive.ubuntu.com/ubuntu focal/main amd64 libyaml-tiny-perl all 1.73-1 [25.2 kB]
Get:19 http://archive.ubuntu.com/ubuntu focal/universe amd64 openjade amd64 1.4devel1-21.3ubuntu1 [244 kB]
Get:20 http://archive.ubuntu.com/ubuntu focal/universe amd64 prerex amd64 6.5.4-1 [28.0 kB]
Get:21 http://archive.ubuntu.com/ubuntu focal/universe amd64 preview-latex-style all 11.91-2ubuntu2 [184 kB]
Get:22 http://archive.ubuntu.com/ubuntu focal/universe amd64 ps2eps amd64 1.68+binaryfree-2 [33.2 kB]
Get:23 http://archive.ubuntu.com/ubuntu focal/universe amd64 pstoedit amd64 3.75-1build1 [392 kB]
Get:24 http://archive.ubuntu.com/ubuntu focal/universe amd64 psutils amd64 1.17.dfsg-4 [56.2 kB]
Get:25 http://archive.ubuntu.com/ubuntu focal/universe amd64 purifyeps all 1.1-2 [41.8 kB]
Get:26 http://archive.ubuntu.com/ubuntu focal/universe amd64 qt5-gtk-platformtheme amd64 5.12.8+dfsg-0ubuntu1 [124 kB]
Get:27 http://archive.ubuntu.com/ubuntu focal/universe amd64 qttranslations5-l10n all 5.12.8-0ubuntu1 [1486 kB]
Get:28 http://archive.ubuntu.com/ubuntu focal/main amd64 tcl8.6 amd64 8.6.10+dfsg-1 [14.8 kB]
Get:29 http://archive.ubuntu.com/ubuntu focal/universe amd64 tcl amd64 8.6.9+1 [5112 B]
Get:30 http://archive.ubuntu.com/ubuntu focal/universe amd64 teckit amd64 2.5.8+ds2-5ubuntu2 [687 kB]
Get:31 http://archive.ubuntu.com/ubuntu focal/universe amd64 texinfo amd64 6.7.0.dfsg.2-5 [1375 kB]
Get:32 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-bibtex-extra all 2019.202000218-1 [64.7 MB]
Get:33 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-fonts-extra all 2019.202000218-1 [460 MB]
Get:34 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-fonts-extra-doc all 2019.202000218-1 [102 MB]
Get:35 http://archive.ubuntu.com/ubuntu focal/universe amd64 fonts-stix all 1.1.1-4 [591 kB]
Get:36 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-fonts-extra-links all 2019.202000218-1 [20.3 kB]
Get:37 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-fonts-recommended all 2019.20200218-1 [4972 kB]
Get:38 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-fonts-recommended-doc all 2019.20200218-1 [2834 kB]
Get:39 http://archive.ubuntu.com/ubuntu focal/universe amd64 libfontbox-java all 1:1.8.16-2 [207 kB]
Get:40 http://archive.ubuntu.com/ubuntu focal/universe amd64 libpdfbox-java all 1:1.8.16-2 [5199 kB]
Get:41 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-latex-extra all 2019.202000218-1 [12.5 MB]
Get:42 http://archive.ubuntu.com/ubuntu focal/universe amd64 tipa all 2:1.3-20 [2978 kB]
Get:43 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-xetex all 2019.20200218-1 [14.6 MB]
Get:44 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-formats-extra all 2019.202000218-1 [4617 kB]
Get:45 http://archive.ubuntu.com/ubuntu focal/universe amd64 fragmaster all 1.7-8 [123 kB]
Get:46 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-games all 2019.202000218-1 [14.2 MB]
Get:47 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-humanities all 2019.202000218-1 [376 kB]
Get:48 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-humanities-doc all 2019.202000218-1 [25.5 MB]
Get:49 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-lang-arabic all 2019.20200218-1 [18.5 MB]
Get:50 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-lang-cjk all 2019.20200218-1 [1152 kB]
Get:51 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-lang-chinese all 2019.20200218-1 [44.3 MB]
Get:52 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-lang-cyrillic all 2019.20200218-1 [20.9 MB]
Get:53 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-lang-english all 2019.20200218-1 [79.9 MB]
Get:54 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-lang-european all 2019.20200218-1 [14.1 MB]
Get:55 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-lang-french all 2019.20200218-1 [59.2 MB]
Get:56 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-lang-german all 2019.20200218-1 [24.4 MB]
Get:57 http://archive.ubuntu.com/ubuntu focal/universe amd64 texlive-lang-italian all 2019.20200218-1 [7065 kB]
dpkg: error processing package fontconfig (--configure):
installed fontconfig package post-installation script subprocess returned error exit status 127
No apport report written because MaxReports is reached already
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for tex-common (6.13) ...
/var/lib/dpkg/info/tex-common.postinst: 117: mktemp: not found
dpkg: error processing package tex-common (--configure):
installed tex-common package post-installation script subprocess returned error exit status 127
No apport report written because MaxReports is reached already
Processing triggers for sgml-base (1.29.1) ...
Errors were encountered while processing:
javascript-common
latex-cjk-chinese-arphic-gbsn00lp
latex-cjk-chinese-arphic-bkai00mp
latex-cjk-chinese-arphic-gkai00mp
latex-cjk-all
latex-cjk-chinese-arphic-bsmi00lp
tipa
texlive-full
texlive-xetex
cm-super
texlive-formats-extra
texinfo
fontconfig
tex-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
你的系统错过了mktemp
可执行文件如下面代码片段所述:
/var/lib/dpkg/info/tex-common.postinst: 117: mktemp: not found
使用以下命令安装:
sudo apt-get install coreutils
然后通过以下方式恢复 texlive 的安装:
sudo apt-get install -f
sudo dpkg --configure -a
sudo apt install texlive-full
答案2
驱动器上有多少可用空间C:
?正如 N0rbert 指出的那样,mktemp
未安装以及多条No apport report written because MaxReports is reached already
消息似乎表明可用空间存在问题。
还要检查 的任何部分C:
(尤其是C:\Users\
)是否被压缩或加密。如果实例的虚拟硬盘被压缩或加密,也可能会导致写入磁盘时出现问题。请参阅这个问题有关如何在 Windows 中禁用这些功能的详细信息。
如果是压缩或可用空间问题,那么您应该考虑卸载并重新安装 Ubuntu 实例。如果coreutils
安装不正确,那么其他必要组件可能也没有完全安装。