title: Why does CPAN.pm fail to upgrade?
body: <blockquote>
    <p>Clarification: I'm pretty much a
    Perl/CPAN noob, don't assume I know
    too much.</p>
  </blockquote>
  
  <p>I have a pretty vanilla <code>CPAN</code> because I just rebuild my entire Lenny 5.0.2 VPS - so I pretty much have the default modules installed.</p>
  
  <p>My eventual goal is to setup <code>foswiki</code> on my Apache 2.x based server.</p>
  
  <p>So far I'm reading this guide and it says the first thing you should do is upgrade CPAN to the latest version. So I did (as <code>su</code>):</p>
  
  <pre>
  # perl -MCPAN -e '$ENV{FTP_PASSIVE} = 1; install CPAN'
  </pre>
  
  <p>Now, it's installing/updating a bunch of stuff, here's an excerpt:</p>
  
  <pre>
  CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-Expect-1.00.tar.gz
  CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-UnsatPrereq-1.00.tar.gz
  CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CHECKSUMS
  CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/cpantestdummies/
  CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/cpantestdummies/CPAN-Test-Dummy-Perl5-Make-Features-1.05.tgz
  CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/cpantestdummies/CHECKSUMS
  CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-Zip-1.03.zip
  CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CHECKSUMS.2nd
  CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-1.05.tar.gz
  CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-Failearly-1.02.tar.gz
  CPAN-1.9402/t/CPAN/authors/id/A/AN/CHECKSUMS
  CPAN-1.9402/t/CPAN/authors/id/A/CHECKSUMS
  CPAN-1.9402/t/CPAN/authors/id/CHECKSUMS
  CPAN-1.9402/t/CPAN/authors/01mailrc.txt
  CPAN-1.9402/t/CPAN/CpanTestDummies-1.55.pm
  CPAN-1.9402/t/CPAN/TestConfig.pm
  CPAN-1.9402/t/51pod.t
  CPAN-1.9402/t/02nox.t
  CPAN-1.9402/t/50pod.t
  CPAN-1.9402/t/10version.t
  CPAN-1.9402/t/yaml_code.yml
  CPAN-1.9402/t/04clean_load.t
  CPAN-1.9402/README
  CPAN: File::Temp loaded ok (v0.18)
  
    CPAN.pm: Going to build A/AN/ANDK/CPAN-1.9402.tar.gz
  
  Importing PAUSE public key into your GnuPG keychain... gpg: new configuration file `/root/.gnupg/gpg.conf' created
  gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
  done!
  (You may wish to trust it locally with 'gpg --lsign-key 450F89EC')
  Checking if your kit is complete...
  Looks good
  Writing Makefile for CPAN
  Could not read '/root/.cpan/build/CPAN-1.9402-fmK7xK/META.yml'. Falling back to other methods to determine prerequisites
    ANDK/CPAN-1.9402.tar.gz
    make -- NOT OK
  Warning (usually harmless): 'YAML' not installed, will not store persistent state
  Running make test
    Can't test without successful make
  Running make install
    Make had returned bad status, install seems impossible
  kat:~# 
  </pre>
  
  <p>I've searched Google and came across one page that said you should whenever possible install the package from aptitude/apt-get/yum, so I found a package named <code>libyaml-perl</code>, marked it for download, that went through fine.</p>
  
  <p>Then I re-tried my initial command that installs the latest version of CPAN and ...</p>
  
  <pre>
  CPAN-1.9402/t/50pod.t
  CPAN-1.9402/t/10version.t
  CPAN-1.9402/t/yaml_code.yml
  CPAN-1.9402/t/04clean_load.t
  CPAN-1.9402/README
  CPAN: File::Temp loaded ok (v0.18)
  CPAN: YAML loaded ok (v0.66)
  
  CPAN.pm: Going to build A/AN/ANDK/CPAN-1.9402.tar.gz
  
  Importing PAUSE public key into your GnuPG keychain... done!
  (You may wish to trust it locally with 'gpg --lsign-key 450F89EC')
  Checking if your kit is complete...
  Looks good
  Writing Makefile for CPAN
    ANDK/CPAN-1.9402.tar.gz
    make -- NOT OK
  Running make test
    Can't test without successful make
  Running make install
    Make had returned bad status, install seems impossible
  </pre>
  
  <p>No clue what I should do now. Is there a way I can reset everything? Maybe I need to kill the file it tried to process so it can try to re-process it or something along those lines? If anyone else has general CPAN tips in addition to figuring out what this is, I'd be grateful.</p>
  
  <ul>
  <li>Did I install the yaml package the right way? </li>
  <li>Should I have done it from within CPAN?</li>
  <li>What proper steps or modules should I get first?</li>
  </ul>
  
  <p>Eventually I'll need to install these for foswiki:</p>
  
  <ul>
  <li>CGI::Session - Needed for Foswiki's session feature which is really a must have</li>
  <li>Error - Needed if you later want to develop plugins. It is also distributed with Foswiki but the author has experienced lots of trouble with the build script that builds plugins which sometimes cannot find this library. By adding it to the site Perl library you avoid this kind of trouble.</li>
  <li>FreezeThaw - an indirectly needed module used by other modules.</li>
  <li>GD - Used by the pluging that can produce graphics such as Foswiki:Plugins.ChartPlugin. It requires that lib gd is installed. If your choice of installation does not include you simply need to install the rpms gd and gd-devel. They are both on the CDs or DVD.</li>
  <li>HTML::Tree - Needed by some popular plugins</li>
  <li>Time-modules (Time::CTime, Time::DaysInMonth, Time::JulianDay, Time::ParseDate, Time::Timezone) also needed by some popular plugins. </li>
  </ul>