0

我有一台 Windows 10 笔记本电脑,以前从未安装过 TeX 发行版(仔细检查了配置目录、文件和环境变量)。

想要安装 TeX Live 2021,我遵循了完整的安装指南并阅读了Windows 特定的警告。我现在已经尝试了几次,遵循不同的安装程序——每次之前都清理所有内容(删除基本目录和用户目录、环境变量等)——但仍然无法成功安装。在我在 tex-live@tug 报告错误之前,我想在这里寻求建议,以防我做错了什么。这是我所做的,一步一步的,以及我在这个过程中遇到的问题。

1.首先我尝试运行推荐的在线安装程序install-tl-windows.exe。即使在等待 30 分钟后,它也从未通过尝试联系或从存储库加载的屏幕。试了十几次,选择近处和远处不同的镜子。没运气。

2.然后我下载并解压了install-tl.zip并在install-tl-windows.bat其中运行。这次出现了主安装窗口。我留下了所有默认路径和环境变量(请注意,我确实有写权限C:);在选择方案中,我未选择除美国和英国英语之外的所有语言,未选择 XeTeX、LuaTeX、ConTeXt;还取消选择 TeXworks(我使用 Emacs),然后单击安装。一到三个小时后(取决于我选择的镜像),安装完成。

我尝试编译一个最小的乳胶文档(见下文),并得到一个类似于这个旧问题中的错误:

I can't find the format file `pdflatex.fmt'

按照该问题的答案中的建议以及其他在线类似问题(例如this )中的建议,我尝试运行texhashfmtutil-sys --all。后者给出了错误

no appropriate script or programme found fmtutil.

网上也有很多帖子。

2a。不明白问题可能是什么,我重新尝试了以下三个选项的所有可能组合:(a)选择不同的镜子;(b) 保留完整的包选择(即不取消选择某些语言、LuaTeX 等);(c) 通过选择“以管理员身份运行”来重做该过程。没运气。

3.此时我尝试下载完整安装的ISO文件。安装映像并运行install-tl-windows.bat(作为普通用户,按照建议;我再说一遍,我确实有写权限C:)。一切都按照上面的步骤2进行。在安装结束时,我尝试pdflatex在最小的乳胶文档上运行。这次的新错误:

This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/W32TeX) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./minimal-template.tex
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-02-18>

! LaTeX Error: File `article.cls' not found.

很奇怪。文件搜索显示article.cls在 TeXLive 文件系统中;但kpathsea确实没有看到。

4.此时我从开始菜单打开了TeX Live Shell;选择了一个 CTAN 镜像;更新了TL Manager不是最新的;更新了所有软件包;运行Regenerate filename database;并运行Regenerate formats。对于后者,我得到了这个错误:

tex live shell:
mtutil [INFO]: total formats: 59
fmtutil [INFO]: exiting with status 53
C:\texlive\2021\bin\win32\runscript.tlu:915: command failed with exit code 53:
perl.exe c:\texlive\2021\texmf-dist\scripts\texlive\fmtutil.pl  --sys --all

这是“其他”选项卡中出现的完整错误集的片段(出于隐私考虑,我用星号替换了我的用户目录;请注意,我确实对这些目录具有写入权限):

start load https://www.nic.funet.fi/pub/TeX/CTAN/systems/texlive/tlnet
finish load https://www.nic.funet.fi/pub/TeX/CTAN/systems/texlive/tlnet
start load http://contrib.texlive.info/current
finish load http://contrib.texlive.info/current
running mktexlsr ...
done running mktexlsr.
running mtxrun --generate ...
done running mtxrun --generate.
running updmap-sys ...
done running updmap-sys.
regenerating fmtutil.cnf in C:/texlive/2021/texmf-dist
running fmtutil-sys --byengine luatex --no-error-if-no-format --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --status-file=C:\Users\***\AppData\Local\Temp\rPSb0Dpak2\WW_dJvUHgX ...

tlmgr.pl: fmtutil-sys --byengine luatex --no-error-if-no-format --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --status-file=C:\Users\***\AppData\Local\Temp\rPSb0Dpak2\WW_dJvUHgX failed (status 255), output:
Unknown option: status-file
Try "fmtutil --help" for more information.
C:\texlive\2021\bin\win32\runscript.tlu:915: command failed with exit code 255:
perl.exe c:\texlive\2021\texmf-dist\scripts\texlive\fmtutil.pl  --sys --byengine luatex --no-error-if-no-format --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --status-file=C:\Users\***\AppData\Local\Temp\rPSb0Dpak2\WW_dJvUHgX 
running fmtutil-sys --byengine luajithbtex --no-error-if-no-format --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --status-file=C:\Users\***\AppData\Local\Temp\rPSb0Dpak2\WW_dJvUHgX ...

无论如何,我尝试继续Regenerate fontmaps,然后在最小文档上再次尝试 pdflatex。新错误:

This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2021/W32TeX) (preloaded format=pdflatex)
 restricted \write18 enabled.
---! c:/texlive/2021/texmf-var/web2c/pdftex/pdflatex.fmt made by different executable version
(Fatal format file error; I'm stymied)

5.我再次尝试了步骤3.4.,但使用“以管理员身份运行”。同样的错误。


好的,此时我放弃了,真的不知道该怎么办。难道我做错了什么?目前我必须同意这篇文章:TeX Live 2021 的安装完全失败。


这是我用于测试的最小乳胶文件(复制和粘贴):
\documentclass{article}

\begin{document}

test

\section{Section}

test

\end{document}
4

0 回答 0