5

I installed the 32 bit version of Strawberry perl(5.14.2.1). I am able to run the perl command. When ever I run the cpan command I get the following error:

Can't locate App/Cpan.pm in @INC (@INC contains: /usr/lib/perl5/5.8.8/msys /usr/
lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/msys /usr/lib/perl5/site_perl/5.8
.8 /usr/lib/perl5/site_perl .) at /c/strawberry/perl/bin/cpan line 5.
BEGIN failed--compilation aborted at /c/strawberry/perl/bin/cpan line 5.

I migrated from the 64 bit version to the 32 bit version. The cpan command used to work when I was using the 64 bit version.

Harish Shetty
  • 64,083
  • 21
  • 152
  • 198

1 Answers1

11

"/usr/lib/perl5/5.8.8/msys"? You aren't running Strawberry Perl! The cpan file you are running was installed by another Perl. Try

C:\>c:\strawberry\perl\bin\perl -MCPAN -e shell
ikegami
  • 367,544
  • 15
  • 269
  • 518
  • I had `msysgit` installed on my machine which ships with `perl.exe`. I had to fix the path to address the issue. – Harish Shetty May 31 '12 at 17:16
  • just put the path/to/perl before /path/to/msysgit in the PATH, like this: C:\Strawberry\perl\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\c\bin;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Git\bin; – Vinh Jul 05 '13 at 09:04
  • Hi, I don't succeed here. I have exactly the same order in my PATH but when I run `perl -` I get: `This is perl, v5.8.8 built for msys`. I want to run my strawberry perl. Thanks for help. – LaRiFaRi Nov 12 '13 at 08:26
  • 1
    @LaRiFaRi, Not the place to ask new questions. Either change the path so Strawberry Perl's dir comes first, or use the full path (e.g. `c:\strawberry\perl\bin\perl`) to start `perl`. – ikegami Nov 12 '13 at 15:32