perl 安装包失败

perl 安装包失败

安装DBI

[root@develop ~]# perl -MCPAN -e 'install DBI'            
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
  Database was generated on Sat, 07 Jun 2008 16:06:46 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 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 /root/.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 /root/.cpan/sources/modules/03modlist.data.gz
Can't locate object method "data" via package "CPAN::Modulelist" (perhaps you forgot to load "CPAN::Modulelist"?) at (eval 11) line 1.
at /usr/lib/perl5/5.8.8/CPAN.pm line 3405
        CPAN::Index::rd_modlist('CPAN::Index', '/root/.cpan/sources/modules/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(0x8fcf450)', 'CPAN::Module', 'DBI') called at /usr/lib/perl5/5.8.8/CPAN.pm line 1841
        CPAN::Shell::expandany('CPAN::Shell', 'DBI') called at /usr/lib/perl5/5.8.8/CPAN.pm line 2077
        CPAN::Shell::rematein('CPAN::Shell', 'install', 'DBI') called at /usr/lib/perl5/5.8.8/CPAN.pm line 2164
        CPAN::Shell::install('CPAN::Shell', 'DBI') called at /usr/lib/perl5/5.8.8/CPAN.pm line 79
        CPAN::AUTOLOAD('DBI') called at -e line 1
手工装 试过吗
试过了
其实我是在测试机器上安装Catalyst报的类似错,我已经安装了DBI了,还报这种错误,不知道什么原因
可能是默认缓存/root/.cpan中的数据损坏
先rm -rf ~/.cpan
然后在CPAN中执行reload index
然后执行install Bundle::CPAN
最后执行reload CPAN试试
我记得我以前做catalyst时,有个哥们做了一个叫catinbox的包。也要装dbi,我手工装的,成功了
还是不行:
[root@backup ~]# rm -rf .cpan/
[root@backup ~]# perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.7602)
ReadLine support available (try 'install Bundle::CPAN')

cpan> reload index
CPAN: Storable loaded ok
LWP not available

Trying with "/usr/bin/links -source" to get
    http://cpan.modperl.cn/authors/01mailrc.txt.gz

gzip: /root/.cpan/sources/authors/01mailrc.txt: not in gzip format
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz

Trying with "/usr/bin/links -source" to get
    http://cpan.modperl.cn/modules/02packages.details.txt.gz

gzip: /root/.cpan/sources/modules/02packages.details.txt: not in gzip format
Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
Warning: Your /root/.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 /root/.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.

Trying with "/usr/bin/links -source" to get
    http://cpan.modperl.cn/modules/03modlist.data.gz

gzip: /root/.cpan/sources/modules/03modlist.data: not in gzip format
Going to read /root/.cpan/sources/modules/03modlist.data.gz
Can't locate object method "data" via package "CPAN::Modulelist" (perhaps you forgot to load "CPAN::Modulelist"?) at (eval 21) line 1.
at /usr/lib/perl5/5.8.8/CPAN.pm line 3405
        CPAN::Index::rd_modlist('CPAN::Index', '/root/.cpan/sources/modules/03modlist.data.gz') called at /usr/lib/perl5/5.8.8/CPAN.pm line 3128
        CPAN::Index::reload('CPAN::Index', 1) called at /usr/lib/perl5/5.8.8/CPAN.pm line 3065
        CPAN::Index::force_reload('CPAN::Index') called at /usr/lib/perl5/5.8.8/CPAN.pm line 1587
        CPAN::Shell::reload('CPAN::Shell', 'index') called at /usr/lib/perl5/5.8.8/CPAN.pm line 201
        eval {...} called at /usr/lib/perl5/5.8.8/CPAN.pm line 201
        CPAN::shell() called at -e line 1
perl版本
[root@backup ~]# perl -v

This is perl, v5.8.8 built for i386-linux-thread-multi

Copyright 1987-2006, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
把手动安装报错信息贴出来看看