1

I work with LaTeX Workshop in VS Code and have just switched from MikTex to TexLive. But it seems that there is something wrong when I compile with the LaTeX Workshop like this:

The output is as follows:

File::Path version 2.08 required--this is only version 1.08 at c:\texlive\2019\texmf-dist\scripts\latexmk\latexmk.pl line 270.
BEGIN failed--compilation aborted at c:\texlive\2019\texmf-dist\scripts\latexmk\latexmk.pl line 270.
C:\texlive\2019\bin\win32\runscript.tlu:911: command failed with exit code 255:
perl.exe c:\texlive\2019\texmf-dist\scripts\latexmk\latexmk.pl -synctex=1 -interaction=nonstopmode -file-line-error -pdf "-outdir=c:/Users/sunha/OneDrive - HKUST Connect/workspace for VS Code/workspace for latex/COMP 2711H Homework 4" "c:/Users/sunha/OneDrive - HKUST Connect/workspace for VS Code/workspace for latex/COMP 2711H Homework 4/hw4"

It seems that there's something wrong with the version, however, I can compile without problems with command lines like

pdflatex filename.tex

So what's the problem? How can I fix it?

4
  • You say you an run pdflatex manually, is that from VS COde or from the terminal/dos prompt? What happens if you run latexmk -pdf filename.tex? Generally these filtered outputs from editors are not worth much, so the first thing to do is always to check the tool without the editor. – daleif Dec 10 '19 at 9:20
  • 1
    The error message is from latexmk, not pdflatex, so the proper test from the command line is the one @daleif gave. The error message indicates that you have an extremely out of date installation of Perl , because it has version 1.08 of Perl's File/Path.pm instead of at least 2.08 as required by latexmk for over 6 years. The version of File::Path currently shipped with TeXLiive on MS-Windows is 2.15. So the first task to solve the problem is update your Perl installation to a current version. – John Collins Dec 10 '19 at 17:10
  • I have figured out what has happened: The old version of Perl embedded in octave was used due to the settings of environmental variables. – Jeff Sun Dec 12 '19 at 2:46
  • Will you convert the comment to an answer or shall I? An answer would be useful to anyone having the same problem. – John Collins Dec 12 '19 at 17:04
0

Referring to the comment from the other users, the error message was from latexmk rather than pdflatex. If we are to test it with command line we shall use

latexmk -pdf filename.tex

instead.

In my case, it turned out that my detected version of Perl is extremely out of date since latexmk requires version 2.08 or above. The detected one, or in other words, the one in my system environment variables, however, was the one embedded in the Octave rather than the one embedded in the TeXLive. So if we encounter such problems, we should check our system variables and see whether latexmk is trying to make use of other copies of Perls on your disk and if that's the case, we should adjust the environment variables properly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.