I am trying to compile a LaTeX document in VS Code on Windows 11. After installing MiKTeX and the LaTeX extension for VS Code, when I try to compile my .tex file I get the following error:
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.
Therefore, I thought: Okay let’s follow the suggested remedy. I went to perl.org, downloaded the source code, and followed the instructions from cpan.org:
tar -xzf perl-5.40.0.tar.gz
cd perl-5.40.0
./Configure -des -Dprefix=$HOME/localperl
make
make test
make install
However, after running ./Configure -des -Dprefix=$HOME/localperl
, I get the following error:
Program 'configure.com' failed to run: The specified executable is not a valid application for this OS platform.At line
:1 char:1
+ ./Configure -des -Dprefix=$HOME/localperl
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
At line:1 char:1
+ ./Configure -des -Dprefix=$HOME/localperl
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
As I understand from this, I guess that this is not compatible with my OS, which is Windows 11. Any clue on how to solve this and install perl on windows 11? Or avoid having to use it to compile a .tex document in VS Code.
I would like to avoid having to install Strawberry Perl or ActiveState Perl if I can.
Thank you in advance for your taking your time.
Alex