I can't install the Perl library(ies) needed to run latexindent

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

I can't install the Perl library(ies) needed to run latexindent

Joe Heafner
I’m trying to use latexindent on my iMac running MacTeX 2020 under Catalina 10.15.6. I’m following the instructions in the latexindent documentation. When I attempt to run the installer script

perl latexindent-module-installer.pl

it fails becuase Perl can’t find the script. So when I give the full path to the script, the run still fails and I get:

============
latexindent.pl module installer
============
Would you like to run the following commands?
cpanm YAML::Tiny
cpanm File::HomeDir
cpanm Unicode::GCString
cpanm Log::Log4perl
cpanm Log::Dispatch
Press Y to run the above commands (Y/N): Y
Can't exec "cpanm": No such file or directory at /usr/local/texlive/2020/texmf-dist/doc/support/latexindent/latexindent-module-installer.pl line 29, <STDIN> line 1.
Can't exec "cpanm": No such file or directory at /usr/local/texlive/2020/texmf-dist/doc/support/latexindent/latexindent-module-installer.pl line 29, <STDIN> line 1.
Can't exec "cpanm": No such file or directory at /usr/local/texlive/2020/texmf-dist/doc/support/latexindent/latexindent-module-installer.pl line 29, <STDIN> line 1.
Can't exec "cpanm": No such file or directory at /usr/local/texlive/2020/texmf-dist/doc/support/latexindent/latexindent-module-installer.pl line 29, <STDIN> line 1.
Can't exec "cpanm": No such file or directory at /usr/local/texlive/2020/texmf-dist/doc/support/latexindent/latexindent-module-installer.pl line 29, <STDIN> line 1.
(base) heafnerj@Betelgeuse ~ %

Any help would be appreciated.


Joe Heafner
Sent from one of my Macs


----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Reply | Threaded
Open this post in threaded view
|

Re: I can't install the Perl library(ies) needed to run latexindent

John Burt-4
Just looking at your post it appears to me that you need to download cpanm, which is a program from retrieving modules from CPAN.
John

On Thu, Jul 16, 2020 at 11:10 PM Joe Heafner <[hidden email]> wrote:
I’m trying to use latexindent on my iMac running MacTeX 2020 under Catalina 10.15.6. I’m following the instructions in the latexindent documentation. When I attempt to run the installer script

perl latexindent-module-installer.pl

it fails becuase Perl can’t find the script. So when I give the full path to the script, the run still fails and I get:

============
latexindent.pl module installer
============
Would you like to run the following commands?
cpanm YAML::Tiny
cpanm File::HomeDir
cpanm Unicode::GCString
cpanm Log::Log4perl
cpanm Log::Dispatch
Press Y to run the above commands (Y/N): Y
Can't exec "cpanm": No such file or directory at /usr/local/texlive/2020/texmf-dist/doc/support/latexindent/latexindent-module-installer.pl line 29, <STDIN> line 1.
Can't exec "cpanm": No such file or directory at /usr/local/texlive/2020/texmf-dist/doc/support/latexindent/latexindent-module-installer.pl line 29, <STDIN> line 1.
Can't exec "cpanm": No such file or directory at /usr/local/texlive/2020/texmf-dist/doc/support/latexindent/latexindent-module-installer.pl line 29, <STDIN> line 1.
Can't exec "cpanm": No such file or directory at /usr/local/texlive/2020/texmf-dist/doc/support/latexindent/latexindent-module-installer.pl line 29, <STDIN> line 1.
Can't exec "cpanm": No such file or directory at /usr/local/texlive/2020/texmf-dist/doc/support/latexindent/latexindent-module-installer.pl line 29, <STDIN> line 1.
(base) heafnerj@Betelgeuse ~ %

Any help would be appreciated.


Joe Heafner
Sent from one of my Macs


----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Reply | Threaded
Open this post in threaded view
|

Re: I can't install the Perl library(ies) needed to run latexindent

Herbert Schulz
In reply to this post by Joe Heafner
> On Jul 16, 2020, at 10:10 PM, Joe Heafner <[hidden email]> wrote:
>
> I’m trying to use latexindent on my iMac running MacTeX 2020 under Catalina 10.15.6. I’m following the instructions in the latexindent documentation. When I attempt to run the installer script
>
> perl latexindent-module-installer.pl
>
> it fails becuase Perl can’t find the script. So when I give the full path to the script, the run still fails and I get:
>
> ============
> latexindent.pl module installer
> ============
> Would you like to run the following commands?
> cpanm YAML::Tiny
> cpanm File::HomeDir
> cpanm Unicode::GCString
> cpanm Log::Log4perl
> cpanm Log::Dispatch
> Press Y to run the above commands (Y/N): Y
> Can't exec "cpanm": No such file or directory at /usr/local/texlive/2020/texmf-dist/doc/support/latexindent/latexindent-module-installer.pl line 29, <STDIN> line 1.
> Can't exec "cpanm": No such file or directory at /usr/local/texlive/2020/texmf-dist/doc/support/latexindent/latexindent-module-installer.pl line 29, <STDIN> line 1.
> Can't exec "cpanm": No such file or directory at /usr/local/texlive/2020/texmf-dist/doc/support/latexindent/latexindent-module-installer.pl line 29, <STDIN> line 1.
> Can't exec "cpanm": No such file or directory at /usr/local/texlive/2020/texmf-dist/doc/support/latexindent/latexindent-module-installer.pl line 29, <STDIN> line 1.
> Can't exec "cpanm": No such file or directory at /usr/local/texlive/2020/texmf-dist/doc/support/latexindent/latexindent-module-installer.pl line 29, <STDIN> line 1.
> (base) heafnerj@Betelgeuse ~ %
>
> Any help would be appreciated.
>
>
> Joe Heafner
> Sent from one of my Macs

Howdy,

Take a look at <https://learn.perl.org/installing/osx.html> for some information that might help.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Reply | Threaded
Open this post in threaded view
|

Re: I can't install the Perl library(ies) needed to run latexindent

Joe Heafner
In reply to this post by Joe Heafner

> Message: 5
> Date: Fri, 17 Jul 2020 06:09:28 -0400
> From: John Burt <[hidden email]>
> To: TeX on Mac OS X Mailing List <[hidden email]>
> Subject: Re: [OS X TeX] I can't install the Perl library(ies) needed
> to run latexindent
> Message-ID:
> <[hidden email]>
> Content-Type: text/plain; charset="utf-8"
>
> Just looking at your post it appears to me that you need to download cpanm,
> which is a program from retrieving modules from CPAN.
> John
>

Okay that seemed simple enough. However, given my complete lack of experience with perl, I think I may have download and somehow installed it on top of the system perl, which I see is not advised. So, I then installed brewperl, which installed into ~/ as expected. When I now invoke perl from a command line, I still get the system perl. My $PATH seems to have the brewperl settings at the very end rather at the very beginning of the PATH, but the configuration scripts did that. I’m not sure what to do at this point. I don’t want to ruin the system perl.

Joe Heafner
Sent from one of my Macs


----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Reply | Threaded
Open this post in threaded view
|

Re: I can't install the Perl library(ies) needed to run latexindent

Joe Heafner
In reply to this post by Joe Heafner
After over two hours of trying and googling, I finally got latexindent working. There were two problems. 1) Somehow the perl installation process (https://learn.perl.org/installing/osx.html) eventually appended the perl PATH to the *end* of my existing path and not prepended it to the beginning, so I always got Apple’s perl. 2) Once I fixed that, I finally stumbled onto this page

https://tex.stackexchange.com/questions/445521/latexindent-cant-locate-log-log4perl-pm-in-inc-you-may-need-to-install-the-l

and followed the suggestion of installing the necessary modules from inside cpan, not from a command line. I have no idea why this is necessary, but after that I was running latexindent. Thanks for all who helped!

BTW, Is there a way to access latexindent from inside TeXShop?

Joe Heafner
Sent from one of my Macs


----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Reply | Threaded
Open this post in threaded view
|

Re: I can't install the Perl library(ies) needed to run latexindent

Herbert Schulz
> On Jul 17, 2020, at 8:01 PM, Joe Heafner <[hidden email]> wrote:
>
>
> BTW, Is there a way to access latexindent from inside TeXShop?

Howdy,

Probably the best way to do that would to write an Applescript based macro that Saves and Closes the file, uses a system call to run latexindent on the file and then, after possible renaming, Opens the updated file.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex