1
votes

I'm new to perl, but, I'm just trying to install it on my windows 10 machine, because, I need to use a NAGIOS plugin named check_logfiles. A perl script/app.

while I am installing Strawberry Perl, I need additional Modules. I invoked CPAN to install more modules and it fails because it finds the GIT Perl CPAN.

how ( can I ) can Perl be installed and this Perl installation is selected instead of the GIT perl? I don't know if I can de-install GIT's Perl ?

ERROR
Trying with
    /c/bin/wget.EXE -O "/c/Users/212555427/.cpan/sources/authors/01mailrc.txt.gz.tmp7712"
to get
    http://www.cpan.org/authors/01mailrc.txt.gz
--14:42:06--  http://www.cpan.org/authors/01mailrc.txt.gz
           => `C:/Users/212555427/.cpan/sources/authors/01mailrc.txt.gz.tmp7712'
Resolving www.cpan.org... failed: Host not found.

This /c/Users/212555427/.cpan is the GIT installation

I install Strawberry Perl under default C:\Strawberry

$ which perl
/usr/bin/perl

$ where perl
C:\Strawberry\perl\bin\perl.exe
C:\Program Files\Git\usr\bin\perl.exe


$ where cpan
C:\Strawberry\perl\bin\cpan
C:\Strawberry\perl\bin\cpan.bat
C:\Program Files\Git\usr\bin\core_perl\cpan

$ cpan Date::Manip.pm
WARNING: your version of App::Cpan is 1.63_01 while we would expect at least 1.64 at /c/Strawberry/perl/bin/cpan line 11.
Loading internal null logger. Install Log::Log4perl for logging messages
Fetching with LWP:
http://www.cpan.org/authors/01mailrc.txt.gz
LWP failed with code[500] message[Can't connect to www.cpan.org:80]

Trying with
    /c/bin/wget.EXE -O "/c/Users/212555427/.cpan/sources/authors/01mailrc.txt.gz.tmp22892"
to get
    http://www.cpan.org/authors/01mailrc.txt.gz

thank you - please let me know if I need to provide anything else to resolve issue.

1
What does cpan -v output? and perl --version ?Håkon Hægland
$ which perl \\ /usr/bin/perl : Is this correct? In my CMD prompt there is no command whichHåkon Hægland
ahh, interesting - I have bash for windows installed, I open a bash window. so I am looking at 2 different shells. but why would I get 2 different things? Please see I added to the bottom of question.GLMills

1 Answers

0
votes

Hakon THANK YOU !!! MORE DETAILS ON PROBLEM

I have git-bash installed with Unix Utilities. interesting.

in Git-Bash shell window :

212555427@GPF18Y095E MINGW64 ~/devel
$ cpan -v
WARNING: your version of App::Cpan is 1.63_01 while we would expect at least 1.64 at /c/Strawberry/perl/bin/cpan line 1                1.
Loading internal null logger. Install Log::Log4perl for logging messages

212555427@GPF18Y095E MINGW64 ~/devel
$ perl -v

This is perl 5, version 24, subversion 1 (v5.24.1) built for x86_64-msys-thread-multi

Copyright 1987-2017, Larry Wall

IN A WINDOWS COMMAND PROMPT

This is perl 5, version 30, subversion 2 (v5.30.2) built for MSWin32-x64-multi-thread

Copyright 1987-2020, Larry Wall

C:\Users\212555427>cpan -v
Loading internal logger. Log::Log4perl recommended for better logging
>(info): C:\Strawberry\perl\bin/cpan script version 1.675, CPAN.pm version 2.27

The Windows Command prompt looks to give what is needed, the GIT-BASH shell looks to give the GIT installation. Am I looking at this right? so, If I just keep Windows Command prompt shells I shouldn't see conflicts. I'm guessing. Going to try it out now.