Perl CPAN::Modulelist的解决办法
发布:smiling 来源: PHP粉丝网 添加日期:2014-09-05 09:33:53 浏览: 评论:0
今天用CPAN安装Term::ReadLine,报了个这样的错误:
- 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 31) line 1.
- at /usr/lib/perl5/5.8.5/CPAN.pm line 3406
- CPAN::Index::rd_modlist('CPAN::Index', '/root/.cpan/sources/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 675
- CPAN::exists('CPAN=HASH(0x9c79658)', 'CPAN::Module', 'Term::ReadLine') called at /usr/lib/perl5/5.8.5/CPAN.pm line 1842
- CPAN::Shell::expandany('CPAN::Shell', 'Term::ReadLine') called at /usr/lib/perl5/5.8.5/CPAN.pm line 2078
- CPAN::Shell::rematein('CPAN::Shell', 'install', 'Term::ReadLine') called at /usr/lib/perl5/5.8.5/CPAN.pm line 2165
- CPAN::Shell::install('CPAN::Shell', 'Term::ReadLine') 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 -e line 1
google结果有人是这样解决的:
rm -rf ~/.cpan
删除后在perl -MCPAN -e shell中执行reload index
然后执行install Bundle::CPAN
最后执行reload CPAN即可正常通过命令行install MODULES
我按照这个做,结果reload index执行都报错,继续google,发现应该是Config.pm的问题,重新配置:
cpan> o conf urllist unshift http://www.perl.com/CPAN/
cpan> o conf commit
然后再执行上面的reload index之后的步骤就OK了.
Tags: Perl CPAN Modulelist
相关文章
- ·Perl6 的 YAML::Dumper 模块使用详解(2014-09-21)
推荐文章
热门文章
最新评论文章
- 写给考虑创业的年轻程序员(10)
- PHP新手上路(一)(7)
- 惹恼程序员的十件事(5)
- PHP邮件发送例子,已测试成功(5)
- 致初学者:PHP比ASP优秀的七个理由(4)
- PHP会被淘汰吗?(4)
- PHP新手上路(四)(4)
- 如何去学习PHP?(2)
- 简单入门级php分页代码(2)
- php中邮箱email 电话等格式的验证(2)