使用 VScode 设置 Latex:错误 配方因错误而终止。Perl 遇到问题

Jam*_*ie 5 perl latex miktex pdflatex visual-studio-code

我已经在 Windows 10 上使用 VScode 和 LaTeX Workshop 扩展设置了 Latex,但是我遇到了一些问题,每次我尝试构建项目时都会出现错误:Recipe 因错误而终止。我在这里关注了很多帖子,但不幸的是没有结果。输出日志如下所示:

Sorry, but latexmk did not succeed for the following reason:

  MiKTeX could not find the script engine 'perl' which is required to execute 'latexmk'.

Remedy:

  Make sure 'perl' is installed on your system.

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

  C:\Users\Local\MiKTeX\miktex\log\latexmk.log

For more information, visit: https://miktex.org/kb/fix-script-engine-not-found
latexmk: major issue: So far, you have not checked for MiKTeX updates.
Run Code Online (Sandbox Code Playgroud)

我安装了 Perl 并设置了路径,并将建议的日志文件添加到了我的 JSON 文件中,但仍然遇到相同的错误。我的 .json 文件如下所示:

{
    "window.zoomLevel": 0,
    "workbench.colorTheme": "Abyss",
    "terminal.integrated.shell.windows": "C:/windows/System32/cmd.exe",
    "workbench.settings.editor": "json",
    "latex-workshop.view.pdf.viewer": "tab",
    "latex-workshop.latex.search.rootFiles.include" : ["C:/Users/vscode-lecture-files/**/*.tex"],
    "latex-workshop.latex.autoBuild.run":"onFileChange",
    "latex-workshop.latex.recipes": [
        {  
            "name": "latexmk",  
            "tools": [  
                "latexmk"  
            ],
            "includePath":[
                
                "C:/Users/Local/Programs/MiKTeX/miktex/bin/x64/latexmk.exe",
                "C:/Dwimperl",
                "C:/Users/Local/MiKTeX/miktex/log/latexmk.log",
                "C:/Dwimperl/perl/bin/perl.exe"
            ]
              
        },  

        {
            "name": "pdflatex*2",
            "tools": [
                "pdflatex",
                "pdflatex" 
            ],
            "env": {}
        }
    ],
    "latex-workshop.latex.verbatimEnvs":[
        "verbatim",
        "lstlisting",
        "minted"
    ],
    "security.workspace.trust.untrustedFiles": "open"
}


Run Code Online (Sandbox Code Playgroud)

有人可以帮助我了解发生了什么事吗?谢谢