Instale o script cpanminus
para obter, descompactar, construir e instalar módulos do CPAN.
-
sudo apt-get install cpanminus
-
cpan App::cpanminus
Agora instale o módulo GD :: Graph com o seguinte comando:
-
cpanm GD::Graph
Eu instalei a versão mais recente do Perl CPAN no Ubuntu.
Quando tento instalar qualquer módulo CPAN usando o comando perl -MCPAN -e shell;install GD::Graph
, estou vendo o seguinte erro:
**root@karthik#perl -MCPAN -e shell** ***Terminal does not support AddHistory. cpan shell -- CPAN exploration and modules installation (v1.9800) Enter 'h' for help. cpan[1]> install GD::Graph CPAN: Storable loaded ok (v2.20) Reading '/root/.cpan/sources/authors/01mailrc.txt.gz' CPAN: Compress::Zlib loaded ok (v2.02) ............................................................................DONE Reading '/root/.cpan/sources/modules/02packages.details.txt.gz' Database was generated on Fri, 29 Jun 2012 06:14:35 GMT CPAN: HTTP::Date loaded ok (v5.831) ............................................................................DONE Reading '/root/.cpan/sources/modules/03modlist.data.gz' Catching error: "'glob' trapped by operation mask at (eval 28) line 1.\cJ at /usr/share/perl/5.10/CPAN/Index.pm line 524\cJ\cICPAN::Index::rd_modlist('CPAN::Index', '/root/.cpan/sources/modules/03modlist.data.gz') called at /usr/share/perl/5.10/CPAN/Index.pm line 85\cJ\cICPAN::Index::reload('CPAN::Index') called at /usr/share/perl/5.10/CPAN.pm line 976\cJ\cICPAN::exists('CPAN=HASH(0x93dd658)', 'CPAN::Module', 'GD::Graph') called at /usr/share/perl/5.10/CPAN/Shell.pm line 1256\cJ\cICPAN::Shell::expandany('CPAN::Shell', 'GD::Graph') called at /usr/share/perl/5.10/CPAN/Shell.pm line 1681\cJ\cICPAN::Shell::rematein('CPAN::Shell', 'install', 'GD::Graph') called at /usr/share/perl/5.10/CPAN/Shell.pm line 1977\cJ\cICPAN::Shell::__ANON__('CPAN::Shell', 'GD::Graph') called at /usr/share/perl/5.10/CPAN.pm line 376\cJ\cIeval {...} called at /usr/share/perl/5.10/CPAN.pm line 373\cJ\cICPAN::shell() called at -e line 1\cJ" at /usr/share/perl/5.10/CPAN.pm line 392 CPAN::shell() called at -e line 1 Reading '/root/.cpan/sources/authors/01mailrc.txt.gz' ............................................................................DONE Reading '/root/.cpan/sources/modules/02packages.details.txt.gz' Database was generated on Fri, 29 Jun 2012 06:14:35 GMT ............................................................................DONE Reading '/root/.cpan/sources/modules/03modlist.data.gz' Terminal does not support GetHistory. Lockfile removed. 'glob' trapped by operation mask at (eval 30) line 1. at /usr/share/perl/5.10/CPAN/Index.pm line 524 CPAN::Index::rd_modlist('CPAN::Index', '/root/.cpan/sources/modules/03modlist.data.gz') called at /usr/share/perl/5.10/CPAN/Index.pm line 85 CPAN::Index::reload('CPAN::Index') called at /usr/share/perl/5.10/CPAN.pm line 693 CPAN::all_objects('CPAN=HASH(0x93dd658)', 'CPAN::Distribution') called at /usr/share/perl/5.10/CPAN/Shell.pm line 1044 CPAN::Shell::failed('CPAN::Shell', 1, 1) called at /usr/share/perl/5.10/CPAN.pm line 414 eval {...} called at /usr/share/perl/5.10/CPAN.pm line 414 CPAN::shell() called at -e line 1***
Como posso resolver isso?
Instale o script cpanminus
para obter, descompactar, construir e instalar módulos do CPAN.
sudo apt-get install cpanminus
cpan App::cpanminus
Agora instale o módulo GD :: Graph com o seguinte comando:
cpanm GD::Graph