无法在 Windows 中首次构建和查看 pdfLatex

无法在 Windows 中首次构建和查看 pdfLatex

我刚刚安装了 MikTex,然后安装了 TexStudio,但是我无法像\documentclass{article}在 texStudio 中那样编译简单的代码并出现错误:

在此处输入图片描述

这是指向的日志:

2021-02-14 13:03:48,278+0330 INFO  pdflatex - this process (9136) started by 'texstudio' with command line: pdflatex.exe -synctex=1 -interaction=nonstopmode test1.tex
2021-02-14 13:03:48,286+0330 WARN  pdflatex - security risk: running with elevated privileges
2021-02-14 13:03:48,293+0330 INFO  pdflatex - allowing known shell commands
2021-02-14 13:03:48,326+0330 INFO  pdflatex - going to create file: pdflatex.fmt
2021-02-14 13:03:48,361+0330 INFO  pdflatex.core - start process: initexmf --dump-by-name=pdflatex --engine=pdftex
2021-02-14 13:03:49,395+0330 ERROR pdflatex - C:\Users\z.gh\AppData\Local\Programs\MiKTeX\miktex\bin\x64\initexmf.exe did not succeed; exitCode: 1
2021-02-14 13:03:49,395+0330 ERROR pdflatex - output:
2021-02-14 13:03:49,395+0330 ERROR pdflatex - initexmf: security risk: running with elevated privileges

Sorry, but "MiKTeX Configuration Utility" did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\z.gh\AppData\Local\MiKTeX\miktex\log\initexmf.log

2021-02-14 13:03:49,395+0330 FATAL pdflatex.core - The memory dump file could not be found.
2021-02-14 13:03:49,395+0330 FATAL pdflatex.core - Data: fileName="pdflatex.fmt"
2021-02-14 13:03:49,396+0330 FATAL pdflatex.core - Source: Libraries\MiKTeX\TeXAndFriends\texmfapp.cpp:717
2021-02-14 13:03:49,396+0330 FATAL pdflatex - The memory dump file could not be found.
2021-02-14 13:03:49,396+0330 FATAL pdflatex - Info: fileName="pdflatex.fmt"
2021-02-14 13:03:49,396+0330 FATAL pdflatex - Source: Libraries\MiKTeX\TeXAndFriends\texmfapp.cpp
2021-02-14 13:03:49,396+0330 FATAL pdflatex - Line: 717
2021-02-14 13:03:49,396+0330 INFO  pdflatex - this process (9136) finishes with exit code 1

我该如何解决这个问题?

答案1

我尝试了所有类似问题的解决方案,但都不起作用,

然后通过更新 我的 Windows 10有效!

相关内容