[tex-live] latexindent can't find perl modules

Siep Kroonenberg siepo at cybercomm.nl
Fri Nov 28 15:23:37 CET 2014

On Fri, Nov 28, 2014 at 12:58:16PM +0100, Ulrike Fischer wrote:
> When I run latexindent it fails because it can't find some perl
> modules:
> G:\Z-Test\test3>latexindent test3.tex
> Can't locate YAML/Tiny.pm in @INC (you may need to install the
> YAML::Tiny module
> ) (@INC contains: D:/texlive/2014/tlpkg/tlperl/lib
> d:/texlive/2014/tlpkg/tlperl/lib .) at
> d:/texlive/2014/texmf-dist/scripts/latexindent/latexindent.pl line
> 20.
> BEGIN failed--compilation aborted at
> d:/texlive/2014/texmf-dist/scripts/latexind
> ent/latexindent.pl line 20.
> D:\texlive\2014\bin\win32\runscript.tlu:652: command failed with
> exit code 2:
> perl.exe
> d:/texlive/2014/texmf-dist/scripts/latexindent/latexindent.pl
> test3.tex
> The modules are there (I have active perl installed) and in miktex
> latexindent can find them. How can I tell texlive to use them? Or
> alternativly could texlive use the package executable provided by
> latexindent instead of the perl script
> (http://www.ctan.org/tex-archive/support/latexindent).
> (The second would be actually the better solution as the perl script
> fails anyway currently due to some incompatibility with the newest
> YAML-Tiny).

The texlua wrapper runscript.tlu mentions in a Changelog comment:

- use of external Perl now requires kpathsea variable
  TEXLIVE_WINDOWS_TRY_EXTERNAL_PERL to be explicitly set to 1

As to the latexindent binary: just make sure it comes first on the

lrike Fischer 

Siep Kroonenberg

More information about the tex-live mailing list