Skip to main content
Share Your Experience: Take the 2024 Developer Survey
38 votes

latexindent: Can't locate Log/Log4perl.pm in @INC (you may need to install the Log::Log4perl module)

UPDATE: Log4perl is definitely no longer required. See comments. Original Answer For others running into the same issue but on a Mac: Install perl via brew: brew install perl Use cpan to install the ...
songololo's user avatar
  • 481
33 votes
Accepted

latexindent: Can't locate Log/Log4perl.pm in @INC (you may need to install the Log::Log4perl module)

Thanks to @Nicola's comment, the error can be fixed as follows: The missing module is Log::Log4perl as found in the first line of the error. Open Win 10 start menu and search for CPAN client, then ...
Diaa's user avatar
  • 9,649
7 votes
Accepted

What is »thumbpdf« good for?

it's good for almost nothing these days, the update was actually triggered by a request not to load it into hyperdoc (which caused it to be loaded in all l3doc documentation). while doing that I ...
David Carlisle's user avatar
6 votes

Can't locate Algorithm/Diff.pm in @INC (you may need to install the Algorithm::Diff module)

Install the Algorithm::Diff package from Perl's CPAN package repository. You can do this by running the following command. perl -MCPAN -e "install Algorithm::Diff"
Diomidis Spinellis's user avatar
5 votes

latexdiff encoding issue

For me, the solution was to use plain old cmd instead of Powershell. It seems that powershell uses UTF-16, which messes up the encoding of the output.
pulsejet's user avatar
  • 151
5 votes

Compiling document with PerlTeX, then luaLaTeX - conditional \usepackage based on compilation tool

Since you are using arara (thank you!), how about the following approach: Let's create a new rule named writeconfig.yaml which, as the name indicates, creates a configuration file based on the ...
Paulo Cereda's user avatar
  • 44.3k
5 votes
Accepted

How can I avoid this regex error when attempting to use texdef?

the perl code needs to be updated at the points indicated (lines 391 and lines 394 to use \{ and \} not { and } elsif ($macrodef =~ /^\\\@protected\@testopt \{?\\.*? \}? *(\\\\.*?) /) { ...
David Carlisle's user avatar
4 votes

perltex fails when using fourier package macro expression as argument to perl macro

The fourier package does \AtBeginDocument{\let\mathbb\math@bb} which sort of works, but not really. See When to use \LetLtxMacro? \documentclass{article} \usepackage{fourier} \usepackage{...
egreg's user avatar
  • 1.1m
3 votes
Accepted

Perltex Can't Locate Perl Modules

Add to a local texmf.cnf TEXLIVE_WINDOWS_TRY_EXTERNAL_PERL = 1 From the texmf.cnf documentation: % This variable is specific to Windows. It must be set to 0 or 1. The % default is 0. Setting it ...
Ulrike Fischer's user avatar
3 votes
Accepted

Problem in using pdfcrop

I could solve the problem by installing Ghostscript. If you are using Windows, then Perl and Ghostscript does not come along with that. If you want to crop a pdf using pdfcrop, then you have to ...
pkj's user avatar
  • 511
3 votes

How can I avoid this regex error when attempting to use texdef?

Do not use this solution if you install TeX Live using packages distributed by a Linux distro, you are a Windows user or doing so requires root privileges and you are not sure what you're doing. ...
cfr's user avatar
  • 202k
3 votes

latexindent: Can't locate Log/Log4perl.pm in @INC (you may need to install the Log::Log4perl module)

As of Version 3.9 the Log4Perl module is no longer loaded by latexindent.pl. Details of the required perl modules are documented and sample installations steps are given in .travis.yml and appveyor....
3 votes

TeX Live manager: perl.exe stopped working

I managed to avoid this error by doing things via a the command line in an Administrator cmd window. Here is what I did: Start an Administrator cmd.exe Change directory to where the TeXLive binaries ...
banbh's user avatar
  • 1,075
2 votes

Can the tlperl folder in a (Windows) texLive installation be deleted or is it needed for the compilation of documents?

No, please don't delete it! Many scripts in TeX Live, foremost the important scripts fmtutil and updmap are written in Perl and require tlperl. In case you delete the folder you will be able to run ...
norbert's user avatar
  • 8,317
2 votes

TeX Live manager: perl.exe stopped working

I used install-tl-advanced.bat (as an administrator). First time it didn't work. I tried again at it worked perfectly! Maybe there is something wrong with Windows.
user87115's user avatar
  • 111
2 votes
Accepted

Error with Perl interpreter and glossaries package on Windows

The key here is your Perl version on Windows. As you can see at the Perl doc site, one of the changes introduced in Perl 5.26 was forbidding of using unescaped braces { and } in regular expressions. ...
Sergei Golovan's user avatar
2 votes
Accepted

Fancytooltip error during fancy-preview

The fancytooltips package must be called with the inactive option. Then it compiles.
Zoltan Csati's user avatar
2 votes

latexindent: Can't locate Log/Log4perl.pm in @INC (you may need to install the Log::Log4perl module)

MacOS Big Sur New problems arise for Big Sur. Here is my Fix. (The solution assumed you've installed homebrew. ) Step 1. Install the perl & its package manager brew install perl brew install ...
Boyan's user avatar
  • 121
2 votes
Accepted

Vim, latexmk and accented filenames

I give a detailed description to make it useful for others encountering similar problems. Diagnosis: The OP arranged to call latexmk from the editor vim, when the name of the file é 3.tex contained ...
John Collins's user avatar
  • 11.3k
2 votes
Accepted

What is the recommended way to protect a TeX Live file from updates with no changes or to auto-patch it on such updates?

As mentioned in nobert's comment, packages can now be 'pinned' by adding them in a comma-separated list update-exclude = \ <package1-name>,\ <package2-name>,\ ... etc. to texmf.cnf.
2 votes
Accepted

Output of PerlTex with current TeXlive on Windows

The call of perltex should be perltex --latex=pdflatex <filename> With TeXworks you can define a new tool, here's the relevant window I don't think there's a way to pass options to pdflatex, ...
egreg's user avatar
  • 1.1m
2 votes
Accepted

Automated quote from price list

As promised I want to present my Python/pandas-based approach. You will need to have a Python distribution installed, I usually recommend Anaconda (https://www.anaconda.com/distribution/#download-...
Uwe Ziegenhagen's user avatar
2 votes

Adding entry .bib file breaks LaTeX Workshop in VS Code

The solution was contained in here: latexindent: Can't locate Log/Log4perl.pm in @INC (you may need to install the Log::Log4perl module) The reason why this post didn't initially work for me is ...
bashfuloctopus's user avatar
2 votes
Accepted

Sorry, but latexmk did not succeed for the following reason:MiKTeX could not find the script engine 'perl.exe' which is required to execute 'latexmk'

I've solved the issue with @0x6d64's help. Just need to add directory of perl.exe to PATH variable. Go to PATH variable select New and type(if you installed strawberry with defaul settings otherwise ...
spitfire's user avatar
2 votes
Accepted

latexindent: trouble installing File::HomeDir, Mac::SystemDirectory since macOS 11 Big Sur

To summarize the solution that worked for me: the issue is the header file EXTERN.h isn't on the CPATH by default in macOS 11 Big Sur. To fix this, add the directory containing EXTERN.h to CPATH: ...
Collin Sinclair's user avatar
2 votes

Struggling with Biber, can't figure out how to install the Perl packages

The same problem happened to me. It seems that biber is trying to use the perl inside your conda environment. I solved it by running conda deactivate and then biber worked fine for me.
Yuxi L's user avatar
  • 21
2 votes
Accepted

LaTeXindent fail in VSCode: Can't locate Log/Log4perl.pm

Going to Latex Workshop VSCode extension settings and editing the "Latex-workshop › Latexindent: Path" matching the latexindent.exe path was enough to solve all the errors.
Fantantonio's user avatar
1 vote
Accepted

TeX Live 2020 - tlmgr cannot load perl-tk although it is installed

If there is a competing perl without perl/tk on your system make sure the distribution package comes first on your PATH.
Siep's user avatar
  • 159
1 vote

Sorry, but latexmk did not succeed for the following reason:MiKTeX could not find the script engine 'perl.exe' which is required to execute 'latexmk'

Just to weigh in for those a bit computer-iliterate like me. the PATH variable is in the control panel > system settings > advanced system settings > evironmental setting. Also one will need ...
BubbleX's user avatar
  • 11
1 vote

Can't locate TeXLive/TLConfig.pm in @INC

According to the Arch Wiki of TeX Live, tlmgr script in TEXMFDIST is broken. The method to fix is to edit TEXMFDIST/scripts/texlive/tlmgr.pl and replace $Master = "$Master/../.."; with $...
GilbertDu's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible