in reply to CPAN install module error

Linux 2.6.18-308.13.1.el5PAE

I have bad news for you. That's CentOS 5 which is hitting EOL a week tomorrow. You would do much better by switching to some other operating system with support extending beyond this month.

If you want to install modules aside from those already available via yum then the cpan tool is not the only option. You may also install the modules by hand which IME gives you better control over the process.

The actual problem you are facing, however, is that you are using the wrong module name. Compare

I have a problem downloading Perl module 'Log::Log4Perl'

with

# cpan -i Perl::Log4Perl

Spot the difference?

Replies are listed 'Best First'.
Re^2: CPAN install module error
by staszeko (Initiate) on Mar 23, 2017 at 21:45 UTC

    Actually, this was a typo in my post.

    Below is the full output of the command.

    # cpan -i Log::Log4perl CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Database was generated on Thu, 16 Jul 2009 15:27:04 GMT Going to read /root/.cpan/sources/authors/01mailrc.txt.gz CPAN: Compress::Zlib loaded ok Going to read /root/.cpan/sources/modules/02packages.details.txt.gz Warning: Your /root/.cpan/sources/modules/02packages.details.txt.gz do +es not contain a Line-Count header. Please check the validity of the index file by comparing it to more than one CPAN mirror. I'll continue but problems seem likely to happen. Warning: Your /root/.cpan/sources/modules/02packages.details.txt.gz do +es not contain a Last-Updated header. Please check the validity of the index file by comparing it to more than one CPAN mirror. I'll continue but problems seem likely to happen. Going to read /root/.cpan/sources/modules/03modlist.data.gz Can't locate object method "data" via package "CPAN::Modulelist" (perh +aps you forgot to load "CPAN::Modulelist"?) at (eval 20) line 1, <FH> + line 20. at /usr/lib/perl5/5.8.8/CPAN.pm line 3405 CPAN::Index::rd_modlist('CPAN::Index', '/root/.cpan/sources/mo +dules/03modlist.data.gz') called at /usr/lib/perl5/5.8.8/CPAN.pm line + 3128 CPAN::Index::reload('CPAN::Index') called at /usr/lib/perl5/5. +8.8/CPAN.pm line 675 CPAN::exists('CPAN=HASH(0x9c77f50)', 'CPAN::Module', 'Log::Log +4perl') called at /usr/lib/perl5/5.8.8/CPAN.pm line 1841 CPAN::Shell::expandany('CPAN::Shell', 'Log::Log4perl') called +at /usr/lib/perl5/5.8.8/CPAN.pm line 2077 CPAN::Shell::rematein('CPAN::Shell', 'install', 'Log::Log4perl +') called at /usr/lib/perl5/5.8.8/CPAN.pm line 2164 CPAN::Shell::install('CPAN::Shell', 'Log::Log4perl') called at + /usr/bin/cpan line 202

      Warning: Your /root/.cpan/sources/modules/02packages.details.txt.gz do +es not contain a Line-Count header. Please check the validity of the index file by comparing it to more than one CPAN mirror. I'll continue but problems seem likely to happen. Warning: Your /root/.cpan/sources/modules/02packages.details.txt.gz do +es not contain a Last-Updated header. Please check the validity of the index file by comparing it to more than one CPAN mirror. I'll continue but problems seem likely to happen.

      So what did you find when you checked the validity of the index file by comparing it to more than one CPAN mirror?

      Actually, this was a typo in my post. Below is the full output of the command.

      Hi, this changes nothing