e-ferrari has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

i have problems updating CPAN with the CPAN-shell. I hope this is a right place for asking such stuff. On CPAN itself i didn't find an appropriate mailing list. If i'm wrong here, please inform me and maybe you know where is a better place to ask. I'm not a developer, i'm a system administrator, my knowledge of perl tends to zero. I have a SLES 11 SP4 64bit with perl 5.10.0. When i start CPAN, it recommends to update:

New CPAN.pm version (v2.10) available. [Currently running version is v1.9205] You might want to try install CPAN reload cpan to both upgrade CPAN.pm and run the new version without leaving the current session.

I tried it already several times. So i deleted all stuff under ~/.cpan/build and also the Metadate file in ~/.cpan before executing the cpan shell again. The first error i get:

... Not in MANIFEST: blib/man3/CPAN::Version.3pm Not in MANIFEST: blib/script/.exists Not in MANIFEST: blib/script/cpan Not in MANIFEST: blib/script/cpan-mirrors Not in MANIFEST: Makefile Not in MANIFEST: MYMETA.json Not in MANIFEST: MYMETA.yml Not in MANIFEST: pm_to_blib ==> MISMATCHED content between MANIFEST and distribution files! <== skipped all skipped: verify failed, so only collect diagnostics t/01loadme....................ok t/02nox.......................ok t/03pkgs......................ok t/04clean_load................ok t/10version...................ok ...

later on:

t/30shell.....................ok t/31sessions..................ok 7/96 # Failed test 'cmd[test CPAN::Test::Dummy::Perl5::Make::OptionalPrer +eq]' # at t/31sessions.t line 560. # 'CPAN: LWP::UserAgent loaded ok (v5.816) # CPAN: Time::HiRes loaded ok (v1.9711) # CPAN: URI::URL loaded ok (v5.03)

This error i get 4 times. I also get:

# Warning: This index file is 16792 days old. # Please check the host you chose as your CPAN mirror for staleness. # I'll continue but problems seem likely to happen. # .................................................................... +........DONE

How can i check which host it is ? The result of the compiling is:

Failed Test Stat Wstat Total Fail List of Failed ---------------------------------------------------------------------- +--------- t/31sessions.t 4 1024 96 4 8 12 16-17 6 tests skipped. Failed 1/30 test scripts. 4/778 subtests failed. Files=30, Tests=778, 106 wallclock secs (80.65 cusr + 7.00 csys = 87. +65 CPU)

line 560 in 31sessions.t is:

is($CPAN::Config->{'7yYQS7'} => 'vGcVJQ'); our $VERBOSE = $ENV{VERBOSE} || 0; <== line 560 my $devnull = File::Spec->devnull;

Bernd

Replies are listed 'Best First'.
Re: problems updating CPAN via CPAN
by choroba (Archbishop) on Jan 25, 2016 at 16:47 UTC
    It seems your urllist is out of date. Try inspecting it with
    cpan o conf urllist

    You can change the values with Perl's array keywords:

    o conf urllist splice 1, 3 o conf urllist push 'http://mirror.cpan.org'
    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
Re: problems updating CPAN via CPAN
by u65 (Chaplain) on Jan 25, 2016 at 16:18 UTC

    Hi, e-ferrari, welcome to the Monastery!

    If you're not in a giant hurry, you might want to consider deleting your current CPAN local mirror, if any, and rebuild it. The instructions are in module CPAN::Mini, but some time ago I extracted just what I need to create my own local mirror. I'll be glad to revisit it and post it here if you want.

    Another reference I used was http://perladvent.pm.org/2004/5th.

    UPDATE: Are you running the code you showed as root or as a normal user?

      Hi, i'm not in a hurry, i wont to fix it. Unfortunately i don't have a local CPAN mirror. Is there a need to have one ? Today you are normally always and everywhere online. I'm running cpan as root. Bernd

        If you were root when you removed ~/.cpan you should have been asked a series of questions when you tried to install cPAN again. One question should have been to choose one or more URLs for CPAN source. Get a list of mirrors and status here http://mirrors.cpan.org/.

        If the ~/.cpan directory now exists, then check the URLs in file ~/.cpan/CPAN/MyConfig.pm and make sure there is one or more valid CPAN sites there.

Re: problems updating CPAN via CPAN
by u65 (Chaplain) on Jan 28, 2016 at 13:03 UTC

    First, I would upgrade your system Perl through your package manager if at all possible. Then I would download the latest CPAN module and try to install it manually, then blow away /root/.cpan and reinstall. If that all doesn't work, then it seems to be one weird misconfiguration. You may have to take more drastic actions such as manually removing all modules installed after the system Perl was installed.

    Other questions: Since you are using SLES, don't you have commercial support? Have any Perl modules been installed by your package manager? How is Perl used on your system (e.g., cron or other system scripts, individual users only, number of Perl users)? How many users do you support?

    Update: I found that other folks using SLES 11 are having Perl update problems. If you need the Perl modules just for yourself, you should look at Perlbrew. You can also share the environment with others.

      Hi, Upgrade is not possible. It's SLES 11 SP4 and SLES tries to keep the versions running as long as possible. That is the idea of an enterprise version. We don't have commercial support. If modules are available through SLES i prefer these, because rpm's can be deleted completely from the system. I don't know how to remove a package cleanly which i installed with CPAN. Is there a way ? Perl is used for a web application. I managed to install Bundle::Cpan with just 2 errors. Everything seem to rune fine although i don't really trust it. What is the difference between Bundle::Cpan and CPAN ? Maybe you have also an answer for these two questions:

      # Database was generated on Tue, 03 Feb 1970 03:17:06 GMT # Warning: This index file is 16794 days old. # Please check the host you chose as your CPAN mirror for staleness. # I'll continue but problems seem likely to happen.

      What does this mean ? I get it quite often, also on other systems. And what does this mean ?

      ... Not in MANIFEST: blib/man3/CPAN::Mirrors.3pm Not in MANIFEST: blib/man3/CPAN::Nox.3pm Not in MANIFEST: blib/man3/CPAN::Plugin.3pm Not in MANIFEST: blib/man3/CPAN::Plugin::Specfile.3pm Not in MANIFEST: blib/man3/CPAN::Queue.3pm Not in MANIFEST: blib/man3/CPAN::Tarzip.3pm Not in MANIFEST: blib/man3/CPAN::Version.3pm Not in MANIFEST: blib/script/.exists Not in MANIFEST: blib/script/cpan Not in MANIFEST: blib/script/cpan-mirrors Not in MANIFEST: Makefile Not in MANIFEST: MYMETA.json Not in MANIFEST: MYMETA.yml Not in MANIFEST: pm_to_blib ==> MISMATCHED content between MANIFEST and distribution files! <==

      I also get it sometimes. Thanks. Bernd

        I assume that you haven't used CPAN as a non-root user. I would manually edit root's MyConfig.pm file and eliminate all URLs except one good mirror. Then post the contents of that file where we can see it. Later we may have to uninstall all Perl modules installed by your package manager, and then investigate your system to see what modules remain. Many monks here know lots of Perl system magic to help in the cleanup.

        Update: One more option is to use cpanm instead of CPAN if we start with a system-clean configuration.

Re: problems updating CPAN via CPAN
by u65 (Chaplain) on Jan 28, 2016 at 17:14 UTC

    Okay, Bernd. I think I would try the following, in this order:

    1. Remove the /root/.cpan folder.
    2. As root, install cpanminus following instructions here.
    3. Then use cpanm for module installation thereafter.

    Good luck! Please let us know if that helps.