在 Freebsd 中安装 perl 包时出错?
Error While installing perl Packages in Freebsd?
我在 freebsd 服务器上安装任何 perl 模块时遇到这个错误,当我用谷歌搜索时我发现 cpan 坏了然后如何在不使用端口的情况下更新 cpan 只想使用 pkg..
cpan JSON
Going to read '/root/.cpan/Metadata'
Database was generated on Tue, 04 Oct 2016 19:17:02 GMT
Going to read '/root/.cpan/sources/authors/01mailrc.txt.gz'
DONE
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.
DONE
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 28) line 1.
at /usr/local/lib/perl5/5.14.2/CPAN/Index.pm line 524
CPAN::Index::rd_modlist('CPAN::Index', '/root/.cpan/sources/modules/03modlist.data.gz') called at /usr/local/lib/perl5/5.14.2/CPAN/Index.pm line 85
CPAN::Index::reload('CPAN::Index') called at /usr/local/lib/perl5/5.14.2/CPAN.pm line 975
CPAN::exists('CPAN=HASH(0x8021b7570)', 'CPAN::Module', 'JSON') called at /usr/local/lib/perl5/5.14.2/CPAN/Shell.pm line 1255
CPAN::Shell::expandany('CPAN::Shell', 'JSON') called at /usr/local/lib/perl5/5.14.2/CPAN/Shell.pm line 1680
CPAN::Shell::rematein('CPAN::Shell', 'install', 'JSON') called at /usr/local/lib/perl5/5.14.2/CPAN/Shell.pm line 1976
CPAN::Shell::__ANON__('CPAN::Shell', 'JSON') called at /usr/local/lib/perl5/5.14.2/App/Cpan.pm line 459
App::Cpan::__ANON__('JSON') called at /usr/local/lib/perl5/5.14.2/App/Cpan.pm line 468
App::Cpan::_default('ARRAY(0x801060798)', 'HASH(0x8021c1ab0)') called at /usr/local/lib/perl5/5.14.2/App/Cpan.pm line 386
App::Cpan::run('App::Cpan', 'JSON') called at /usr/local/bin/cpan line 11
我刚试过这个
mv /root/.cpan /root/.cpanbackup
再次使用 CPAN 工作正常。
我在 freebsd 服务器上安装任何 perl 模块时遇到这个错误,当我用谷歌搜索时我发现 cpan 坏了然后如何在不使用端口的情况下更新 cpan 只想使用 pkg..
cpan JSON
Going to read '/root/.cpan/Metadata'
Database was generated on Tue, 04 Oct 2016 19:17:02 GMT
Going to read '/root/.cpan/sources/authors/01mailrc.txt.gz'
DONE
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.
DONE
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 28) line 1.
at /usr/local/lib/perl5/5.14.2/CPAN/Index.pm line 524
CPAN::Index::rd_modlist('CPAN::Index', '/root/.cpan/sources/modules/03modlist.data.gz') called at /usr/local/lib/perl5/5.14.2/CPAN/Index.pm line 85
CPAN::Index::reload('CPAN::Index') called at /usr/local/lib/perl5/5.14.2/CPAN.pm line 975
CPAN::exists('CPAN=HASH(0x8021b7570)', 'CPAN::Module', 'JSON') called at /usr/local/lib/perl5/5.14.2/CPAN/Shell.pm line 1255
CPAN::Shell::expandany('CPAN::Shell', 'JSON') called at /usr/local/lib/perl5/5.14.2/CPAN/Shell.pm line 1680
CPAN::Shell::rematein('CPAN::Shell', 'install', 'JSON') called at /usr/local/lib/perl5/5.14.2/CPAN/Shell.pm line 1976
CPAN::Shell::__ANON__('CPAN::Shell', 'JSON') called at /usr/local/lib/perl5/5.14.2/App/Cpan.pm line 459
App::Cpan::__ANON__('JSON') called at /usr/local/lib/perl5/5.14.2/App/Cpan.pm line 468
App::Cpan::_default('ARRAY(0x801060798)', 'HASH(0x8021c1ab0)') called at /usr/local/lib/perl5/5.14.2/App/Cpan.pm line 386
App::Cpan::run('App::Cpan', 'JSON') called at /usr/local/bin/cpan line 11
我刚试过这个
mv /root/.cpan /root/.cpanbackup
再次使用 CPAN 工作正常。