Off topic:there is error when i use CPAN install perl model
1
0
Entering edit mode
22 months ago
zhao03 ▴ 60

when i try to use cpan to install perl model , there is an mistake. how can i solve this, i tired to reload index, but, this error always output. thank you for your help!

root@0a15442b1e01:~/.cpan# cpan
Loading internal null logger. Install Log::Log4perl for logging messages
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v2.18)
Enter 'h' for help.

cpan[1]> install XML:Simple
Fetching with HTTP::Tiny:
http://www.cpan.org/authors/01mailrc.txt.gz
Reading '/root/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with HTTP::Tiny:
http://www.cpan.org/modules/02packages.details.txt.gz
Reading '/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.
Fetching with HTTP::Tiny:
http://www.cpan.org/modules/03modlist.data.gz
Reading '/root/.cpan/sources/modules/03modlist.data.gz'
Catching error: "Can't locate object method \"data\" via package \"CPAN::Modulelist\" (perhaps you forgot to load \"CPAN::Modulelist\"?) at (eval 48) line 1.\cJ at /usr/share/perl/5.26/CPAN/Index.pm line 525.\cJ\cICPAN::Index::rd_modlist(\"CPAN::Index\", \"/root/.cpan/sources/modules/03modlist.data.gz\") called at /usr/share/perl/5.26/CPAN/Index.pm line 85\cJ\cICPAN::Index::reload(\"CPAN::Index\") called at /usr/share/perl/5.26/CPAN.pm line 992\cJ\cICPAN::exists(CPAN=HASH(0x55bdbc17c4f8), \"CPAN::Module\", \"XML:Simple\") called at /usr/share/perl/5.26/CPAN/Shell.pm line 1308\cJ\cICPAN::Shell::expandany(\"CPAN::Shell\", \"XML:Simple\") called at /usr/share/perl/5.26/CPAN/Shell.pm line 1742\cJ\cICPAN::Shell::rematein(\"CPAN::Shell\", \"install\", \"XML:Simple\") called at /usr/share/perl/5.26/CPAN/Shell.pm line 2067\cJ\cICPAN::Shell::__ANON__(\"CPAN::Shell\", \"XML:Simple\") called at /usr/share/perl/5.26/CPAN.pm line 376\cJ\cIeval {...} called at /usr/share/perl/5.26/CPAN.pm line 373\cJ\cICPAN::shell() called at /usr/share/perl/5.26/App/Cpan.pm line 414\cJ\cIApp::Cpan::_process_options(\"App::Cpan\") called at /usr/share/perl/5.26/App/Cpan.pm line 511\cJ\cIApp::Cpan::run(\"App::Cpan\") called at /usr/bin/cpan line 13\cJ" at /usr/share/perl/5.26/CPAN.pm line 392.
    CPAN::shell() called at /usr/share/perl/5.26/App/Cpan.pm line 414
    App::Cpan::_process_options("App::Cpan") called at /usr/share/perl/5.26/App/Cpan.pm line 511
    App::Cpan::run("App::Cpan") called at /usr/bin/cpan line 13

when i change the url like this and then reload index, some mistake also exist

cpan[1]> o conf urllist unshift http://www.perl.com/CPAN/
Please use 'o conf commit' to make the config permanent!


cpan[2]> o conf commit
commit: wrote '/root/.cpan/CPAN/MyConfig.pm'

cpan[3]> reload index
Fetching with HTTP::Tiny:
http://www.perl.com/CPAN/authors/01mailrc.txt.gz
Reading '/root/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with HTTP::Tiny:
http://www.perl.com/CPAN/modules/02packages.details.txt.gz
Reading '/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
Fetching with HTTP::Tiny:
http://www.perl.com/CPAN/modules/03modlist.data.gz
Reading '/root/.cpan/sources/modules/03modlist.data.gz'
Catching error: "Can't locate object method \"data\" via package \"CPAN::Modulelist\" (perhaps you forgot to load \"CPAN::Modulelist\"?) at (eval 48) line 1.\cJ at /usr/share/perl/5.26/CPAN/Index.pm line 525.\cJ\cICPAN::Index::rd_modlist(\"CPAN::Index\", \"/root/.cpan/sources/modules/03modlist.data.gz\") called at /usr/share/perl/5.26/CPAN/Index.pm line 85\cJ\cICPAN::Index::reload(\"CPAN::Index\", 1) called at /usr/share/perl/5.26/CPAN/Index.pm line 15\cJ\cICPAN::Index::force_reload(\"CPAN::Index\") called at /usr/share/perl/5.26/CPAN/Shell.pm line 563\cJ\cICPAN::Shell::reload(\"CPAN::Shell\", \"index\") called at /usr/share/perl/5.26/CPAN.pm line 376\cJ\cIeval {...} called at /usr/share/perl/5.26/CPAN.pm line 373\cJ\cICPAN::shell() called at /usr/share/perl/5.26/App/Cpan.pm line 414\cJ\cIApp::Cpan::_process_options(\"App::Cpan\") called at /usr/share/perl/5.26/App/Cpan.pm line 511\cJ\cIApp::Cpan::run(\"App::Cpan\") called at /usr/bin/cpan line 13\cJ" at /usr/share/perl/5.26/CPAN.pm line 392.
    CPAN::shell() called at /usr/share/perl/5.26/App/Cpan.pm line 414
    App::Cpan::_process_options("App::Cpan") called at /usr/share/perl/5.26/App/Cpan.pm line 511
    App::Cpan::run("App::Cpan") called at /usr/bin/cpan line 13
software error perl cpan • 1.2k views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 2032 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6