Search code examples
perlcygwincpan

Why can't I install a module from the CPAN within Cygwin?


I'm attempting to install Spreadsheet::ParseExcel::SaveParser from the CPAN.

When installing it via:

cpan install Spreadsheet::ParseExcel::SaveParser

I get the following unhelpful error during build:

Writing Makefile for Digest::Perl::MD5
/bin/sh: 0: command not found
make: *** [blib/lib/Digest/Perl/.exists] Error 127
/usr/bin/make  -- NOT OK

Digest::Perl::MD5 is a dependency. Does anyone know what is going on?


Interesting error when attempting to download the distribution and install it without cpan, executing Makefile.PL gives:

Unable to find a perl 5 (by these names: /usr/bin/perl.exe perl.exe perl5.exe perl5.8.7.exe miniperl.exe, in these dirs: . /usr/bin /usr/X11R6/bin /usr/local/bin

(followed by the rest of my $PATH. Doing a which perl yields: /usr/bin/perl. perl -v gives a version of 5.8.7.


Solution

  • It looks like the perl executable did not have full execute permissions! (What?)

    From this blog:

    The fix was a simple chmod a+x /usr/bin/perl.exe for anyone who comes across this issue.

    I got a Permission Denied when I did that. I used the Windows Explorer to recursively set 0777 permissions in %CYGWIN%, since make install was failing due to lack of permissions.