2

I'm currently facing challenges with installing Perl on my Windows system, which I need for handling specific LaTeX related packages. My journey so far has led me through a series of issues, and I'm looking for guidance on resolving them effectively.

Initially, I attempted to install StrawberryPerl using Chocolatey, as it's commonly recommended for LaTeX users. However, I encountered a persistent issue related to the File::Which dependency that I couldn't resolve

Fetching http://www.cpan.org/authors/id/R/RE/REHSACK/File-HomeDir-1.006.tar.gz ... OK
Configuring File-HomeDir-1.006 ... OK
==> Found dependencies: File::Which
--> Working on File::Which
Fetching http://www.cpan.org/authors/id/P/PL/PLICEASE/File-Which-1.27.tar.gz ... OK
! Bad archive: File-Which-1.27.tar.gz
! Failed to unpack File-Which-1.27.tar.gz: no directory
! Failed to fetch distribution File-Which-1.27
! Installing the dependencies failed: Module 'File::Which' is not installed
! Bailing out the installation for File-HomeDir-1.006.

The specific error during installation was related to the failure of fetching and unpacking File::Which. Despite several attempts, including changing CPAN mirrors and manually installing the dependency, I could not get past this problem.

Next, I shifted to trying ActivePerl from the ActiveState Platform. Unfortunately, this led to its own set of issues. The installation process failed mid-way, and even though I used Chocolatey for installation

WARNING: Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like the same version is already installed). Please see MSI log if available. If not, try again adding '--install-arguments="'/l*v c:\ActivePerl_msi_install.log'"'. Then search the MSI Log for "Return Value 3" and look above that for the error.
ERROR: Running ["C:\Windows\System32\msiexec.exe" /i "C:\Users\FooBar\AppData\Local\Temp\chocolatey\ActivePerl\5.28.0\ActivePerl-5.28.msi" /quiet TARGETDIR="C:\" PERL_PATH=Yes PERL_EXT=Yes ] was not successful. Exit code was '1603'. Exit code indicates the following: Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like the same version is already installed). Please see MSI log if available. If not, try again adding '--install-arguments="'/l*v c:\ActivePerl_msi_install.log'"'. Then search the MSI Log for "Return Value 3" and look above that for the error..
Environment Vars (like PATH) have changed. Close/reopen your shell to
 see the changes (or in powershell/cmd.exe just type `refreshenv`).
The install of ActivePerl was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\ActivePerl\tools\ChocolateyInstall.ps1'.
 See log for details.

Chocolatey installed 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
 - ActivePerl (exited 1603) - Error while running 'C:\ProgramData\chocolatey\lib\ActivePerl\tools\ChocolateyInstall.ps1'.
 See log for details.

and it resulted in various state.exe files being scattered across my system in different directories (AppData\Local and AppData\Roaming). These files proved to be quite challenging to delete, with 'Access is denied' errors, complicating the situation further.

At this point, I am seeking advice on how to:

  1. Successfully install Perl on Windows for LaTeX work, specifically for the package that requires latexindent.
  2. Resolve the dependency issue encountered with StrawberryPerl, or alternatively,
  3. Complete the installation of ActivePerl without the errors and subsequent file contamination.

I want to avoid falling into an XY problem by addressing the wrong part of my issue. My main goal is to have a working Perl setup that allows me to use latexindent for my LaTeX projects. Any insights, experiences, or recommendations on how to navigate this situation would be greatly appreciated.

3
  • When does the 1st error exactly occur? choco install, separate package install?
    – Destroy666
    Commented Jan 20 at 18:04
  • @Destroy666 when I try running cpanm File::HomeDir
    – Foad
    Commented Jan 20 at 19:01
  • Do you have manual access to cpan.org/authors/id/P/PL/PLICEASE/File-Which-1.27.tar.gz? Did you check if the file is downloaded properly? What's the version of cpanm?
    – Destroy666
    Commented Jan 20 at 19:44

1 Answer 1

1

I too had this problem many years ago and just gave up. Your question reminded me of this, and I managed to get it working.

  1. I'm using the Miktex distribution.
  2. I just installed StrawberryPerl using the MSI downloaded from their site.

I did a test from a terminal using

latexindent test.tex -w

and it worked for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .