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

Hello agin

I want to install some perl modules using the perl -MCPAN -e 'install Bundle::Catalyst' command, since it's not available using apt (debian package).

However, i get the following errors on all modules i try to install:
CPAN.pm: Going to build S/SR/SRI/Catalyst-Plugin-Prototype-1.31.tar.gz Checking whether your kit is complete... Looks good Creating new 'Build' script for 'Catalyst-Plugin-Prototype' version '1 +.31' -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible
and the module isn't installed.
However, when i go to the .cpan/build//Catalyst-Plugin-Prototype-1.31 folder, and do a
perl Makefile.PL make make test make install
All goes fine!
I don't want to install all modules by hand though (there are a lot of prerestiques), and i like to have my perl work normally.
Anyone got a possible solution for me?
ps. yes, i run the command as root, or with sudo.

**UPDATE**
Solved!
After all your tips (i installed it now using apt, thanks to Arunbear), i reinstalled Module::Build by hand, but the cpan command did not work.

Then i came here, and did a cpan> o conf, and found out that my make argument was empty!
so i did a vi /etc/perl/CPAN/Config.pm, changed the line 'make' => q[], to 'make' => q[/usr/bin/make], and it's working again!
Thanks again for all the help

"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.

Replies are listed 'Best First'.
[side note] Re: Install using perl -MCPAN -e 'install module' doesn't work
by blazar (Canon) on Jul 12, 2005 at 08:09 UTC
    Speaking of which raises an oft discussed matter: OS-specific-package vs CPAN.pm! Personally I've seen this discussed in CRUX ml to which I'm subscribed (yes, I'm a CRUX user, of course!) - and I think that a solution that would satisfy both those who want to keep track of everything that is installed on their system and of those who prefer to use Perl's specific tool would be that of patching CPAN.pm itself as of to create a (say) CRUX package on the fly before installing. A solution that would be slightly redundant indeed, but that as I implied would give the best of both words.

    The proposed solution would be particularly simple as of CRUX due to the KISS nature of its packages, but I think it would be doable with other distros as well.

    The key point: however I'm not sure how easy and most importantly how {reliable,maintainable} patching CPAN.pm would be, so I wonder if it could not expose suitable "hooks" for such an "enhancement" instead, say something along the lines of

    perl -MCPAN=CRUX -e shell
    where of course there should be an OS-specific CRUX.pm available somewhere in @LIB, or something like that...
Re: Install using perl -MCPAN -e 'install module' doesn't work
by perrin (Chancellor) on Jul 12, 2005 at 12:53 UTC
    It's trying to use Module::Build, not Makefile.PL. Make sure your Module::Build is up to date.
Re: Install using perl -MCPAN -e 'install module' doesn't work
by kphillips (Beadle) on Jul 12, 2005 at 12:08 UTC
    Is your CPAN module current, i.e., 'install Bundle::CPAN'? That could be an issue.
      Tried that at first. no luck howerver.
      The problem machine is running debian Sarge (stable) on an i686, yet on another machine (with debian for power pc) it's running properly. Both machines are up2date

      "We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.
Re: Install using perl -MCPAN -e 'install module' doesn't work
by Arunbear (Prior) on Jul 12, 2005 at 13:10 UTC
    According to this recent reply to another Catalyst thread, there is a Debian repository from which you can obtain Catalyst.
      Great! I'll try that tomorrow!
      Next, i'll try to update the cpan and Module::Build by hand.
      ps. gri6507, thanks for your help, but i'm not running a rpm-based distribution but apt.

      "We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.
        doesn't the same apply to deb based systems? Shouldn't apt-get perl-devel still work?
Re: Install using perl -MCPAN -e 'install module' doesn't work
by gri6507 (Deacon) on Jul 12, 2005 at 12:57 UTC
    I've had a problem in the past where I would rebrain my machine and start with a clean perl install. However, most RPM based OS's (and maybe windows?) do not install perl headers by default (that is the perl-devel package), so the build process usually fails.

    If you are on a Linux-like system, make sure that your RPMs are up to date and you have the devel RPM.

Re: Install using perl -MCPAN -e 'install module' doesn't work
by brian_d_foy (Abbot) on Jul 12, 2005 at 19:38 UTC

    There's a shortcut for your command line:

    $ cpan Bundle::Catalyst
    --
    brian d foy <brian@stonehenge.com>