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

I'm installing LWP via CPAN. What do you guys think the source of this error is? I've tried doing install Bundle::CPAN but that errors out just the same.

cpan> install Bundle::LWP Going to read /home/user/.cpan/sources/authors/01mailrc.txt.gz Going to read /home/user/.cpan/sources/modules/02packages.details.txt. +gz Warning: Your /home/user/.cpan/sources/modules/02packages.details.txt. +gz does 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 /home/user/.cpan/sources/modules/02packages.details.txt. +gz does 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 /home/user/.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 15) line 1. at /usr/lib/perl5/5.8.5/CPAN.pm line 3406 CPAN::Index::rd_modlist('CPAN::Index', '/home/user/.cpan/sourc +es/modules/03modlist.data.gz') called at /usr/lib/perl5/5.8.5/CPAN.pm + line 3129 CPAN::Index::reload('CPAN::Index') called at /usr/lib/perl5/5. +8.5/CPAN.pm line 786 CPAN::instance('CPAN=HASH(0x94371e4)', 'CPAN::Bundle', 'Bundle +::Apache2') called at /usr/lib/perl5/5.8.5/CPAN.pm line 1428 CPAN::Shell::local_bundles('CPAN::Shell') called at /usr/lib/p +erl5/5.8.5/CPAN.pm line 1836 CPAN::Shell::expandany('CPAN::Shell', 'Bundle::LWP') called at + /usr/lib/perl5/5.8.5/CPAN.pm line 2078 CPAN::Shell::rematein('CPAN::Shell', 'install', 'Bundle::LWP') + called at /usr/lib/perl5/5.8.5/CPAN.pm line 2165 CPAN::Shell::install('CPAN::Shell', 'Bundle::LWP') called at / +usr/lib/perl5/5.8.5/CPAN.pm line 201 eval {...} called at /usr/lib/perl5/5.8.5/CPAN.pm line 201 CPAN::shell() called at /usr/bin/cpan line 193 cpan>

Replies are listed 'Best First'.
Re: CPAN Install Problem (install Bundle::LWP)
by samtregar (Abbot) on May 20, 2005 at 18:13 UTC
    It looks to me like you have some corrupt data in your .cpan directory. I'd blow it away and try again:

    $ rm -rf /home/user/.cpan $ perl -MCPAN -e shell

    Give it a try and let us know how it goes.

    -sam

      Ahh, that worked. It seemed that my Config.pm for CPAN was bad, the http_proxy should have been 'http://myproxy.com:90' instead I had 'myproxy.com:90'.

      When I ran any intall for the first time I get an "proxy error 501" and the second time and on I get the errors I posted above.

      CPAN & Perlmonks RULE!!!
      How to do this in Windows OS?
        How to do this in Windows OS?

        The first command simply removed the ".cpan" directory. In windows you could achieve the same with:
        rmdir /s /q C:/full/path/to/.cpan
        but it might be better to simply rename that directory to (say) ".cpan_hide" (or to just delete it to the recycle bin).
        That way the original .cpan directory is still retrievable.

        For the second command, I'd try running it unchanged:
        perl -MCPAN -e shell
        which should hopefully take you through the process of configuring your new ".cpan" directory.

        However, I'm no expert on CPAN.pm.

        Cheers,
        Rob