First let me say I am not very familiar with Perl or with CPAN so this is to hopefully help out anyone else in my shoes. I received the below type of error during various attempts at installing items from the CPAN shell. I will provide a couple examples of the errors as well as how I figured out that in reality I already had the latest version installed for my version of Perl, which is Perl 5.8.8, and the error was really saying there is a new version but Perl 5.10.0 is required.
First Error: Trying to install Carp via CPAN
cpan[4]> install Carp
Running install for module ‘Carp’
The most recent version “1.08” of the module “Carp”
is part of the perl-5.10.0 distribution. To install that, you need to run
force install Carp –or–
install R/RG/RGARCIA/perl-5.10.0.tar.gz
Running make test
Can’t test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
RGARCIA/perl-5.10.0.tar.gz : make NO isa perl
Verify your local Carp version:
perl -MFile::Find -e ‘print $Carp::VERSION . “\n”;’
Second Error: Trying to install File::Copy
nolock_cpan> install File::Copy
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
CPAN: Compress::Zlib loaded ok (v2.015)
………………………………………………………………….DONE
Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
Database was generated on Sat, 11 Oct 2008 00:26:50 GMT
CPAN: HTTP::Date loaded ok (v1.47)
………………………………………………………………….DONE
Going to read /root/.cpan/sources/modules/03modlist.data.gz
………………………………………………………………….DONE
Running install for module ‘File::Copy’
The most recent version “2.11” of the module “File::Copy”
is part of the perl-5.10.0 distribution. To install that, you need to run
force install File::Copy –or–
install R/RG/RGARCIA/perl-5.10.0.tar.gz
CPAN: Time::HiRes loaded ok (v1.86)
Running make test
Can’t test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
RGARCIA/perl-5.10.0.tar.gz : make NO isa perl
Verify your local File::Copy version:
perl -MFile::Find -e ‘print $File::Find::VERSION . “\n”;’
I eventually found out that the errors had something to do with upgrading perl and not completely reloading the CPAN shell. Try this ti resolve the problem and not have to run the perl script from the Linux shell to find out what version you have installed.
1. cpan> reload index
2. cpan> reload cpan
3. cpan> quit
4. shell# su –
5. shell# perl -MCPAN -e shell
6. Attempt to install your MCPAN bundle again and typically it will report back the correct response this time by telling you that you have the latest and greatest installed like the below.
cpan[1]> install File::Copy
CPAN: Storable loaded ok (v2.18)
Going to read /root/.cpan/Metadata
Database was generated on Sat, 11 Oct 2008 00:26:50 GMT
File::Copy is up to date (2.11).
or
cpan[2]> install Carp
Carp is up to date (1.08).
Ahh the little tips you learn along the way with Perl. I almost tried to upgrade to Perl 5.10.0. :( Hopefully this helps someone out along the way. Check out the Perl book below…. I know I should.