tags:

views:

4491

answers:

3

Here is the complete install command to CPAN and the output:

sudo perl -MCPAN -e "install Bundle::CPAN"
CPAN: Storable loaded ok (v2.13)
Going to read /home/delgreco/.cpan/Metadata
  Database was generated on Mon, 08 Dec 2008 03:27:10 GMT
CPAN: LWP::UserAgent loaded ok (v2.033)
CPAN: Time::HiRes loaded ok (v1.55)
CPAN: YAML loaded ok (v0.39)
Warning: YAML version '0.39' is too low, please upgrade!
I'll continue but problems are *very* likely to happen.
Your urllist is empty! The urllist can be edited. E.g. with 'o conf urllist
push ftp://myurl/'

Could not fetch authors/id/A/AN/ANDK/Bundle-CPAN-1.857.tar.gz
Giving up on '/home/delgreco/.cpan/sources/authors/id/A/AN/ANDK/Bundle-CPAN-1.857.tar.gz'
Note: Current database in memory was generated on Mon, 08 Dec 2008 03:27:10 GMT

        ...propagated at /usr/lib/perl5/5.8.5/CPAN.pm line 3417.

This worked for me, thanks...

cpan> o conf urllist http://cpan.yahoo.com/

Of course, the Bundle::CPAN install proceeded to fail on other dependencies, but at least I have a YAML 0.68 now.

A: 

At a guess:

sudo perl -MCPAN -e "install YAML"
R. Bemrose
Tried that... I get: "Can't locate object method "install" via package "YAML" at -e line 1."
Marcus
You can just type `cpan YAML`
brian d foy
+12  A: 

This looks important:

Your urllist is empty! The urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/'

Perhaps run sudo cpan, then o conf init or o conf urllist push http://cpan.yahoo.com/ (for example) to get your urllist straightened out? Then try to do your installs.

oeuftete
A million thank yous! I've been fighting with CPAN for hours trying to figure this out. Adding the "push" to the o conf urllist command was vital for me. The command Marcus listed as working for him did not work for me without the push.
Lone Coder
+2  A: 

When you first used the CPAN module, you were asked something along the lines of "Are you ready to proceed with interactive configuration?" You probably answered "no." Default configuration options were selected, and so no CPAN repository mirrors were configured for you to pull module tarballs from.

As others have noted, you can configure that option with the o conf urllist command inside the CPAN shell.

My personal preference is to create a "miniCPAN," a local repository that basically contains the latest version of each module (much smaller than pulling ALL of CPAN, which would contain many out of date versions of each module). To do this, configure a CPAN mirror repository to use temporarily, install the CPAN::Mini module from it, then use the minicpan command-line program which will be installed to create your repository. Now use o conf urllist pop to remove the CPAN mirror you configured, and o conf urllist push file:///path/to/your/minicpan to tell the CPAN module to install from your local mirror from now on. You can put the minicpan command in cron to update regularly, or just run it from the command-line whenever you want to refresh.

The format of the minicpan command is

minicpan -l /path/to/your/local/minicpan-repository -r http://example.com/url/of/CPAN/mirror
skiphoppy