错误:找不到格式文件 pdflatex.fmt

错误:找不到格式文件 pdflatex.fmt

我的 MacBook Pro 上安装了 TeX Live,运行MacOSX 10.8的是macports。最近,当我尝试编译 LaTeX 文件时,pdflatex出现了错误

/opt/local/share/texmf-texlive/tex/generic/hyph-utf8/patterns/tex/hyph-fr.tex)
)
! I can't find file `dehypht-x-2012-05-30.tex'.
<to be read again> 
                   \relax 
l.180   \repeat

(Press Enter to retry, or Control-D to exit)
Please type another input file name: 
! Emergency stop.
<to be read ' instead of a filename.
I can't find the format file `pdflatex.fmt'!

经过一些谷歌搜索后,我发现也许sudo fmtutil-sys --all可以解决这个问题,但最终出现了以下错误:

This is a summary of all `failed' messages:
`pdftex -ini  -jobname=pdftex -progname=pdftex -translate-file=cp227.tcx *pdfetex.ini' failed
`pdftex -ini  -jobname=etex -progname=etex -translate-file=cp227.tcx *etex.ini' failed
`pdftex -ini  -jobname=pdfetex -progname=pdfetex -translate-file=cp227.tcx *pdfetex.ini' failed
`pdftex -ini  -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini' failed
`pdftex -ini  -jobname=pdflatex -progname=pdflatex -translate-file=cp227.tcx *pdflatex.ini' failed
`xetex -ini  -jobname=xetex -progname=xetex -etex xetex.ini' failed
`xetex -ini  -jobname=xelatex -progname=xelatex -etex xelatex.ini' failed

关于我可以在这里做什么有什么线索吗?

farhat$ pdflatex --version
pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/MacPorts 2013_1)
kpathsea version 6.1.1
Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.5.16; using libpng 1.5.17
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.22.5

答案1

我今天遇到了同样的问题(这里是 OS X 10.6 和 MacPorts。)对我有用的解决方案是执行sudo port install texlive-lang-german

答案2

当你安装了 TeX 后,不要按照系统提示设置环境。只需设置这一个即可。

#TEXMFSYSVAR=/usr/local/texlive/2013/texmf-var

你 # 它,然后重新登录。 就好了!

相关内容