我的问题是没有文档可以在 MikTex 上编译,即使是最简单的 HelloWorld 文章也不行。错误是Sorry, but "C:\Program Files\MiKTeX 2.9\miktex\bin\x64\miktex-pdftex.exe" did not succeed.
除了这些之外,有时(在尝试编译其他文档时)我还会收到错误Sorry, but "MiKTeX Compiler Driver" did not succeed.
请注意,我已将编译器从 pdfLaTex+MakeIndex+BibTex 更改为仅 pdfLaTex。
很抱歉再次在这里问这个问题,因为已经有很多人问过了。但是,其他问题的答案对我都不起作用——我都试过了。具体来说,我卸载并重新安装了整个 MikTex 应用程序,允许完全控制安装和用户/AppData/local/temp 目录,尝试多次编译 HelloWorld 文档,重新启动我的电脑,通过 MikTex 控制台更新数据库等。
我的设置是一台运行 Windows 10 的 PC,并且我已将 MikTex 2.9 版本更新到最新版本(无论如何,这是一个全新安装)。非常感谢任何有关此事的帮助,我已将日志文件附在下面。
2020-06-15 11:23:04,162+0530 INFO miktex-pdftex - this process (5304) started by 'miktex-texworks' with command line: "C:\Program Files\MiKTeX 2.9\miktex\bin\x64\miktex-pdftex.exe" -synctex=1 -undump=pdflatex hello.tex
2020-06-15 11:23:04,166+0530 INFO miktex-pdftex - allowing known shell commands
2020-06-15 11:23:04,166+0530 INFO miktex-pdftex - enabling input (output) from (to) processes
2020-06-15 11:23:04,185+0530 INFO miktex-pdftex - going to create file: pdflatex.fmt
2020-06-15 11:23:04,210+0530 INFO miktex-pdftex.core - start process: initexmf --enable-installer --dump-by-name=pdflatex --engine=pdftex
2020-06-15 11:23:04,525+0530 INFO miktex-pdftex - this process (3116) started by 'miktex-makefmt' with command line: miktex-pdftex.exe --miktex-enable-installer --miktex-disable-maintenance --miktex-disable-diagnose --initialize --interaction=nonstopmode --halt-on-error --alias=pdflatex --job-name=pdflatex -tcx=cp227.tcx --enable-etex pdflatex.ini
2020-06-15 11:23:04,529+0530 INFO miktex-pdftex - allowing known shell commands
2020-06-15 11:23:04,529+0530 INFO miktex-pdftex - enabling input (output) from (to) processes
2020-06-15 11:23:05,675+0530 INFO miktex-pdftex - this process (3116) finishes with exit code 1
2020-06-15 11:23:05,675+0530 WARN miktex.core - still open: "C:/Program Files/MiKTeX 2.9/tex/latex/00miktex/pdflatex.ini"
2020-06-15 11:23:05,675+0530 WARN miktex.core - still open: "C:\Program Files\MiKTeX 2.9\tex/latex/base\latex.ltx"
2020-06-15 11:23:05,675+0530 WARN miktex.core - still open: "C:\Program Files\MiKTeX 2.9\tex/latex/l3kernel\expl3.ltx"
2020-06-15 11:23:05,675+0530 WARN miktex.core - still open: "C:\Program Files\MiKTeX 2.9\tex/latex/l3kernel\expl3-code.tex"
2020-06-15 11:23:05,675+0530 WARN miktex.core - still open: "C:\Program Files\MiKTeX 2.9\tex/latex/base\ltexpl.ltx"
2020-06-15 11:23:05,714+0530 ERROR miktex-pdftex - C:\Program Files\MiKTeX 2.9\miktex\bin\x64\initexmf.exe did not succeed; exitCode: 1
2020-06-15 11:23:05,714+0530 ERROR miktex-pdftex - output:
2020-06-15 11:23:05,714+0530 ERROR miktex-pdftex -
Sorry, but "MiKTeX Configuration Utility" did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
C:\Users\Aritra Das\AppData\Local\MiKTeX\2.9\miktex\log\initexmf.log
2020-06-15 11:23:05,714+0530 FATAL miktex-pdftex.core - The memory dump file could not be found.
2020-06-15 11:23:05,714+0530 FATAL miktex-pdftex.core - Data: fileName="pdflatex.fmt"
2020-06-15 11:23:05,714+0530 FATAL miktex-pdftex.core - Source: Libraries\MiKTeX\TeXAndFriends\texmfapp.cpp:692
2020-06-15 11:23:05,715+0530 FATAL miktex-pdftex - The memory dump file could not be found.
2020-06-15 11:23:05,715+0530 FATAL miktex-pdftex - Info: fileName="pdflatex.fmt"
2020-06-15 11:23:05,715+0530 FATAL miktex-pdftex - Source: Libraries\MiKTeX\TeXAndFriends\texmfapp.cpp
2020-06-15 11:23:05,715+0530 FATAL miktex-pdftex - Line: 692
2020-06-15 11:23:05,715+0530 INFO miktex-pdftex - this process (5304) finishes with exit code 1
EDIT1:根据评论中的建议,我运行了该命令miktex-pdftex.exe --initialize --halt-on-error --alias=pdflatex --job-name=pdflatex -tcx=cp227.tcx --enable-etex pdflatex.ini
并在命令提示符中出现以下错误。
! LaTeX3 Error: File 'UnicodeData.txt' not found.
For immediate help type H <return>.
...
l.28130 }
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on pdflatex.log.
miktex-pdftex: major issue: So far, no MiKTeX administrator has checked for updates.
因此,我检查了控制台,发现 UnicodeData 包已经安装,所以我不知道是什么导致了这个错误。
答案1
我在全新安装 MikTex 2.9 后遇到了非常类似的问题。我最初将其(不是非常仔细地)追溯到软件包pdftexcmds
,该软件包似乎最近进行了更新,但直到今天才再想起它。
我今天全新安装了 MikTex 2.9,在首次启动 MikTex 控制台时,系统提示我更新,我未勾选 pdftexcmds
(标记为可选)。这已经帮我解决了问题,并且pdflatex
又可以正常工作了。
有趣的是,现在运行pdflatex
时显示它是 MikTex 2.9.7440,而更新后显示是 MikTex 2.9.7441 pdftexcmds
。不幸的是,我对 MikTex 的内部工作原理一无所知,因此无法继续了解。