David W.
David W.

Reputation: 107030

CPAN Issues on Windows XP

I'm suppose to do an install of a few Perl modules on a Windows box. This is a customer UAT box, so I have no idea how it was configured or by who. We did the install on the Dev box, and everything worked as advertised.

The box is running Cygwin, and it has Perl 5.8.8 installed. I can't update it or reinstall Cygwin. I have to use what I have.

I tried installing Spreadsheet::Read on the system, and got the following error:

  CPAN.pm: Going to build F/FD/FDALY/Test-Tester-0.107.tar.gz

 Checking if your kit is complete...
 Looks good
 Unable to find a perl 5 (by these names: /usr/bin/perl.exe perl.exe perl5.exe pe
 rl5.8.7.exe miniperl.exe, in these dirs: /usr/local/bin /usr/bin /bin /usr/X11R6
 /bin /cygdrive/d/oracle/product/10.2.0/client_1/bin /cygdrive/c/WINDOWS/system32
 /cygdrive/c/WINDOWS /cygdrive/c/WINDOWS/System32/Wbem /usr/bin /cygdrive/d/APPL
 IC~1/MCAFEE~1 /cygdrive/d/Applications/PowerCenter8.6.1/server/bin /usr/lib/lap

What? It couldn't find Perl 5? There it is right there in /usr/bin/perl.exe in Cygwin!

There's also an issue with make, but one thing at a time... gcc is installed on Cygwin, so that's not an issue.

What in the heck is going on? I do have .cpan in /cygdrive/p/.cpan, but that's because my HOME directory is defined there. (It's a corporate thing).

Any idea?

I need to install Spreadsheet::Read, Spreadsheet::ParseExcel, and Spreadsheet::XLSX. Is it possible to munge the installation if CPAN doesn't do it's thing, or is there compiled stuff required? Remember, Make is also acting up.


Any chance you can use Strawberry Perl and leave the Cygwin headaches behind?

I've already asked. The answer is no.

You say you have 5.8.8 but it is looking for perl5.8.7.exe. Post the $PATH.

It's Perl 5.8.7. My bad.

Path:

/usr/local/bin
/usr/bin
/bin
/usr/X11R6/bin
/cygdrive/d/oracle/product/10.2.0/client_1/bin
/cygdrive/c/WINDOWS/system32
/cygdrive/c/WINDOWS
/cygdrive/c/System32/Wbem
/usr/bin
/cygdrive/d/APPLIC~1/MFAFEE~1
/cygdrive/d/ApplicationsPowerCenter8.6.1/server/bin
/usr/lib/lapack

Did you check what condition actually displays that message?

There wasn't much of a condition. It downloaded everything then that message.

What's the output of perl -le'print( (-x "/usr/bin/perl.exe") || 0 )'

You win: The permissions were -rwx------. I can't believe I missed that.

What's the output of /usr/bin/perl.exe -e "require 5; print qq{VER_OK\n}" – ikegami 1 hour ago

VER_OK


For some reason, I was able to execute /usr/bin/perl, and certainly CPAN had to (isn't it a Perl program?), but when CPAN was looking for it, it couldn't find it because the permissions were messed up.

Upvotes: 2

Views: 771

Answers (2)

Rook
Rook

Reputation: 62528

I know it's kinda late now (sorry, just saw the question), and this really doesn't answer your question, but for situations when you can't "mess" with the machine you're working on much, I've found portable strawberry perl to be a nice solution for some problems.

Upvotes: 1

ikegami
ikegami

Reputation: 385506

The message comes from ExtUtils::MakeMaker. The message results from not finding an executable (-x) that's not a directory (!-d) that can run -e "require 5; print qq{VER_OK\n}".

So, check the permissions of your Perl,

perl -le'print( (-x "/usr/bin/perl.exe") || 0 )' 

and on the off chance that the above returns true, make sure the following runs:

/usr/bin/perl.exe -e "require 5; print qq{VER_OK\n}"

Upvotes: 2

Related Questions