CPAN geben alle Arten von Fehlern, die auf ubuntu

Ich versuche nur, um führen Sie ein einfaches perl-Programm zum importieren von Daten aus xml-und exportieren Datenbank.

Use Mysql; hat nicht funktioniert, so habe ich DBD::mysql anstatt nach nicht um Mysql.pm von cpan.

Aber ich bin nicht in der Lage irgendetwas zu installieren. Ich bin versucht zu installieren, xml-parser-Modul, sondern cpan gibt diese Fehler, egal was Modul Sie versuchen, zu installieren.

install xml::parser
CPAN: Storable loaded ok (v2.20)
Going to read '/root/.cpan/sources/authors/01mailrc.txt.gz'
CPAN: Compress::Zlib loaded ok (v2.02)
............................................................................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.
CPAN: Time::HiRes loaded ok (v1.9719)
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'
Catching error: "Can't locate object method \"data\" via package \"CPAN::Modulelist\" (perhaps you forgot to load \"CPAN::Modulelist\"?) at (eval 29) line 1.\cJ at /usr/share/perl/5.10/CPAN/Index.pm line 518\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 955\cJ\cICPAN::exists('CPAN=HASH(0xa225610)', 'CPAN::Module', 'xml::parser') called at /usr/share/perl/5.10/CPAN/Shell.pm line 1243\cJ\cICPAN::Shell::expandany('CPAN::Shell', 'xml::parser') called at /usr/share/perl/5.10/CPAN/Shell.pm line 1639\cJ\cICPAN::Shell::rematein('CPAN::Shell', 'install', 'xml::parser') called at /usr/share/perl/5.10/CPAN/Shell.pm line 1935\cJ\cICPAN::Shell::__ANON__('CPAN::Shell', 'xml::parser') called at /usr/share/perl/5.10/CPAN.pm line 375\cJ\cIeval {...} called at /usr/share/perl/5.10/CPAN.pm line 372\cJ\cICPAN::shell() called at /usr/bin/cpan line 198\cJ" at /usr/share/perl/5.10/CPAN.pm line 391
    CPAN::shell() called at /usr/bin/cpan line 198
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.
cpanDONE
Going to read '/root/.cpan/sources/modules/03modlist.data.gz'
No history written (no histfile specified).
Lockfile removed.
Can't locate object method "data" via package "CPAN::Modulelist" (perhaps you forgot to load "CPAN::Modulelist"?) at (eval 31) line 1.
 at /usr/share/perl/5.10/CPAN/Index.pm line 518
    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 692
    CPAN::all_objects('CPAN=HASH(0xa225610)', 'CPAN::Distribution') called at /usr/share/perl/5.10/CPAN/Shell.pm line 1046
    CPAN::Shell::failed('CPAN::Shell', 2, 1) called at /usr/share/perl/5.10/CPAN.pm line 413
    eval {...} called at /usr/share/perl/5.10/CPAN.pm line 413
  CPAN::shell() called at /usr/bin/cpan line 198

Mache ich etwas falsch? Ich habe versucht, die Suche für diesen Fehler, aber keiner hat eine richtige Lösung. Gibt es eine Einstellung in der config, die ich ändern sollte?

  • Wenn Sie die Installation auf dem system Perl-Sie müssen ausgeführt werden, cpan unter sudo. Das problem geht Weg, wenn Sie einen perlbrew Perl und installieren Ihre Module auf Ihrem lokalen Perl.
  • Versuchen Sie /root/.cpan/sources/modules/02packages.details.txt.gz scheint beschädigt zu sein und versuchen Sie es erneut. Wenn das nicht funktioniert entweder, ich würde die Folge Arjuna Del Toso folgenden Ratschläge.
  • Nein, man muss einfach über die CPAN-Konfiguration enthalten sudo in mbuild_install_build_command und make_install_make_command. Aber es sieht aus, wie er bereits als root ausgeführt werden.
  • Nochmals vielen Dank @ysth.
InformationsquelleAutor roymustang86 | 2011-07-29
Schreibe einen Kommentar