Anshu has asked for the wisdom of the Perl Monks concerning the following question:

Hi There,

I am trying to install some Perl modules from CPAN. Upon not being able to install anything (even running 'install Data::Dumper', something that's installed installed and working, throws errors), I found this line in the log for all modules I was trying to install:

Can't exec "make": No such file or directory at /System/Library/Perl/5.10.0/CPAN.pm line 7698.

That kinda told me that the problem is in make. Either make is not installed or broken (can't say which). I also tried to remove .cpan folder in /Users/my_name/ area, but it didn't change anything. Then I checked if the path to Perl or cpan is set properly. I tried the:

'which perl' returned /usr/bin/perl

'which cpan' returned /usr/bin/cpan

perl -MConfig -e 'print $Config{perlpath}, "\n"' returned /usr/bin/perl

I check in the /System/Library/Perl area, and found two folders: 5.8.9 and 5.10.0 . I ran 'perl -v' and it gave this "This is perl, v5.10.0 built for darwin-thread-multi-2level"

So my question is that how do I install the "make" so that I am able to install modules directly from CPAN and don't have to install them manually?

Appreciate your help.

Replies are listed 'Best First'.
Re: Make not working in CPAN shell on OSX
by Anonymous Monk on Jun 10, 2011 at 05:09 UTC
    So my question is that how do I install the "make" so that I am able to install modules directly from CPAN and don't have to install them manually?

    Installing modules manually would be calling make yourself, what you're describing is installing modules by hand -- don't want that.

    See http://developer.apple.com/tools/gcc_overview.html, but don't ask me how install it :)

      thanks "anonymous Monk" for the response

      anyways.. I found the problem.

      I did a 'whereis make' .. and realized that there is no make in /usr/bin

      Then, out of curiosity, I did a 'whereis gcc' .. and realized no gcc either in /usr/bin

      Oddly, I have Xcode installed and these (gcc and make) exist in /Developer/usr/bin

      Then I tried to 'look Spreadsheet::WriteExcel' (in CPAN shell) and tried to do the manual install steps of

      perl Makefile.PL
      /Developer/usr/bin/make install
      no dice still. It told me that
      make: *** No rule to make target `/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE/config.h', needed by `Makefile'. Stop.
      Finally I think my perl installation is pretty much fried. Will reinstall from my OSX DVD.