安装 texlive 后没有可用的格式

安装 texlive 后没有可用的格式

在 Cygwin 下安装 TexLive 后,任何尝试构建 .tex 文件都会失败,并出现错误,提示指定的格式不可用:

$ latex test.tex                                                                       
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Cygwin) (preloaded format=latex)
 restricted \write18 enabled.

kpathsea: Running mktexfmt latex.fmt
mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
mktexfmt:   /home/gecko/.config/texmf/web2c/fmtutil.cnf
mktexfmt [INFO]: writing formats under /home/gecko/.cache/texmf/web2c
mktexfmt [INFO]: did not find entry for byfmt=latex, skipped
mktexfmt [INFO]: Total formats: 0
mktexfmt [INFO]: exiting with status 0
I can't find the format file `latex.fmt'!

指定的fmtutil.cnf文件不存在。

我已经在其他地方阅读过运行fmtutil-sys --all,它执行以下操作:

fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under /var/lib/texmf/web2c
Use of uninitialized value $whatarg in concatenation (.) or string at /usr/bin/fmtutil line 426.
fmtutil [INFO]: did not find entry for all=, skipped
fmtutil [INFO]: Total formats: 0

再次,指定的 fmtutil.cnf 文件不存在。

安装时出现以下信息,表明出现了问题:

Running /etc/postinstall/libpaper.sh
Running /etc/postinstall/texlive-collection-basic.sh
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [WARNING]: Format/engine combination luatex/luatex is not defined.
fmtutil [WARNING]: Cannot (de)activate it.
fmtutil [INFO]: exiting with status -1
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [WARNING]: Format/engine combination dviluatex/luatex is not defined.
fmtutil [WARNING]: Cannot (de)activate it.
fmtutil [INFO]: exiting with status -1
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [WARNING]: Format/engine combination luajittex/luajittex is not defined.
fmtutil [WARNING]: Cannot (de)activate it.
fmtutil [INFO]: exiting with status -1
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [WARNING]: Format/engine combination mf/mf-nowin is not defined.
fmtutil [WARNING]: Cannot (de)activate it.
fmtutil [INFO]: exiting with status -1
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [WARNING]: Format/engine combination pdftex/pdftex is not defined.
fmtutil [WARNING]: Cannot (de)activate it.
fmtutil [INFO]: exiting with status -1
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [WARNING]: Format/engine combination etex/pdftex is not defined.
fmtutil [WARNING]: Cannot (de)activate it.
fmtutil [INFO]: exiting with status -1
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [WARNING]: Format/engine combination pdfetex/pdftex is not defined.
fmtutil [WARNING]: Cannot (de)activate it.
fmtutil [INFO]: exiting with status -1
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [WARNING]: Format/engine combination tex/tex is not defined.
fmtutil [WARNING]: Cannot (de)activate it.
fmtutil [INFO]: exiting with status -1
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under /var/lib/texmf/web2c
fmtutil [INFO]: did not find entry for byfmt=dviluatex, skipped
fmtutil [INFO]: Total formats: 0
fmtutil [INFO]: exiting with status 0
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under /var/lib/texmf/web2c
fmtutil [INFO]: did not find entry for byfmt=etex, skipped
fmtutil [INFO]: Total formats: 0
fmtutil [INFO]: exiting with status 0
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under /var/lib/texmf/web2c
fmtutil [INFO]: did not find entry for byfmt=luajittex, skipped
fmtutil [INFO]: Total formats: 0
fmtutil [INFO]: exiting with status 0
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under /var/lib/texmf/web2c
fmtutil [INFO]: did not find entry for byfmt=luatex, skipped
fmtutil [INFO]: Total formats: 0
fmtutil [INFO]: exiting with status 0
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under /var/lib/texmf/web2c
fmtutil [INFO]: did not find entry for byfmt=mf, skipped
fmtutil [INFO]: Total formats: 0
fmtutil [INFO]: exiting with status 0
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under /var/lib/texmf/web2c
fmtutil [INFO]: did not find entry for byfmt=pdfetex, skipped
fmtutil [INFO]: Total formats: 0
fmtutil [INFO]: exiting with status 0
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under /var/lib/texmf/web2c
fmtutil [INFO]: did not find entry for byfmt=pdftex, skipped
fmtutil [INFO]: Total formats: 0
fmtutil [INFO]: exiting with status 0
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under /var/lib/texmf/web2c
fmtutil [INFO]: did not find entry for byfmt=tex, skipped
fmtutil [INFO]: Total formats: 0
fmtutil [INFO]: exiting with status 0
Running /etc/postinstall/texlive-collection-latex.sh
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [WARNING]: Format/engine combination latex/pdftex is not defined.
fmtutil [WARNING]: Cannot (de)activate it.
fmtutil [INFO]: exiting with status -1
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [WARNING]: Format/engine combination pdflatex/pdftex is not defined.
fmtutil [WARNING]: Cannot (de)activate it.
fmtutil [INFO]: exiting with status -1
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [WARNING]: Format/engine combination dvilualatex/luatex is not defined.
fmtutil [WARNING]: Cannot (de)activate it.
fmtutil [INFO]: exiting with status -1
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [WARNING]: Format/engine combination lualatex/luatex is not defined.
fmtutil [WARNING]: Cannot (de)activate it.
fmtutil [INFO]: exiting with status -1
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [WARNING]: Format/engine combination mptopdf/pdftex is not defined.
fmtutil [WARNING]: Cannot (de)activate it.
fmtutil [INFO]: exiting with status -1
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under /var/lib/texmf/web2c
fmtutil [INFO]: did not find entry for byfmt=dvilualatex, skipped
fmtutil [INFO]: Total formats: 0
fmtutil [INFO]: exiting with status 0
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under /var/lib/texmf/web2c
fmtutil [INFO]: did not find entry for byfmt=latex, skipped
fmtutil [INFO]: Total formats: 0
fmtutil [INFO]: exiting with status 0
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under /var/lib/texmf/web2c
fmtutil [INFO]: did not find entry for byfmt=lualatex, skipped
fmtutil [INFO]: Total formats: 0
fmtutil [INFO]: exiting with status 0
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under /var/lib/texmf/web2c
fmtutil [INFO]: did not find entry for byfmt=mptopdf, skipped
fmtutil [INFO]: Total formats: 0
fmtutil [INFO]: exiting with status 0
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /etc/texmf/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under /var/lib/texmf/web2c
fmtutil [INFO]: did not find entry for byfmt=pdflatex, skipped
fmtutil [INFO]: Total formats: 0
fmtutil [INFO]: exiting with status 0

安装了以下 texlive 包:

texlive-collection-basic
texlive-collection-latex-doc
texlive-collection-latex
texlive

我感觉好像漏掉了什么。我还没有找到任何关于如何设置的 cygwin 教程,但我认为 linux 教程会涵盖相同的步骤。这些似乎都表明安装后该软件包即可使用。

编辑:这个 arch 论坛帖子有一些有用的提示。我跑了

mktexmf --all
texhash

然后有 50 种禁用格式。我启用了 latex 和 pdflatex,但是当我运行时,fmtutil-sys --all我被告知缺少软件包。我会进一步调查。

编辑2:丢失的文件都是我不想使用的语言的连字文件。由于没有更好的主意,我只能一个一个地安装语言文件,但如果有人能告诉我如何避免这样做,我将非常感激。

答案1

如果在安装过程中确实遇到麻烦,那么重新安装总是更安全的。

我遇到了类似的问题(并且来自的信息mktexfmt相同)。首先,检查latex.fmt您的安装中是否存在(为此使用locatefind- 它们可能存在于中cygwin)。

如果该文件存在,那么问题可能是kpathsea 找不到您的文件。运行

kpsewhich --debug -1 latex.fmt

kdebug 显示 fmt 文件的搜索路径(来自 texmf.cnf)。或者,您可以运行

kpsewhich --show-path=fmt

尝试设置

export TEXMF=.:/opt/tex/cur//:

最后两个斜杠表示子目录扩展(用您自己的路径代替我的路径)。 对我来说,这立即起到了帮助作用。

相关内容