I am trying to use use cpan on my windows install version of Git Bash git version 2.18.0.windows.1
. I installed an Active Perl version version 24, subversion 3 (v5.24.3) built for MSWin32-x64-multi-thread
and it is located in C:\Perl64\bin\perl.exe
. I can run cpan
in the cmd under windows just fine but I cannot seem to get it to run in git bash because of the perl5 that comes with it. I either get this error:
Can't locate CPAN/Author.pm in @INC (you may need to install the CPAN::Author module) (@INC contains: /c/Perl64/site/bin /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl) at /usr/share/perl5/core_perl/CPAN.pm line 19.
BEGIN failed--compilation aborted at /usr/share/perl5/core_perl/CPAN.pm line 19.
Compilation failed in require at /c/Octave/Octave-4.4.1/bin/cpan line 119.
BEGIN failed--compilation aborted at /c/Octave/Octave-4.4.1/bin/cpan line 119.
Or when I add the folder than holds the CPAN
folder and consequently Perl
folder to the @INC
path with export PERL5LIB=/c/Perl64/lib
I get this error:
Cwd.c: loadable library and perl binaries are mismatched (got handshake key 0000000600000570, needed 0000000000000000)
Here is print out of @INC path after addition:
~$ perl -e "print qq(@INC)"
/c/Perl64/lib /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl~$
How can I make sure git bash runs cpan like it does in windows?
The full paths that were added when I installed ActivePerl are C:\Perl64\bin
which holds the lib
folder which holds the CPAN
folder (and in it the Author.pm
file) and C:\Perl64\site\bin
and cpan runs fine in windows cmd.
I am ultimately trying to configure and install packages all my self learning for git bash and got to these problems because when I try to configure I get this issue. Been at it for 16 of last 24 hours:
intltool-0.51.0$ ./configure --prefix=/mingw
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... yes
checking for perl... /usr/bin/perl
checking for perl >= 5.8.1... 5.26.2
checking for XML::Parser... configure: error: XML::Parser perl module is required for intltool