Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Trouble with MCPAN

by mron (Novice)
on Apr 01, 2024 at 06:12 UTC ( [id://11158611]=perlquestion: print w/replies, xml ) Need Help??

mron has asked for the wisdom of the Perl Monks concerning the following question:

I tried to execute this command on a MacBook running osX 14.4.1:
perl -MCPAN -e 'install XML::Parser'
The command fails to load the module, hanging until I kill it. Here's the output:
Reading '/Users/me/.cpan/Metadata' Database was generated on Wed, 26 Oct 2016 18:53:30 GMT Reading '/Users/me/.cpan/sources/authors/01mailrc.txt.gz' ...................................................................... +......DONE Fetching with LWP: http://mirror.jre655.com/CPAN/modules/02packages.details.txt.gz LWP failed with code[500] message[Can't connect to mirror.jre655.com:8 +0 (nodename nor servname provided, or not known)] Trying with /usr/bin/curl -L -f -s -S --netrc-optional to get http://mirror.jre655.com/CPAN/modules/02packages.details.txt.gz curl: (6) Could not resolve host: mirror.jre655.com Function system("/usr/bin/curl -L -f -s -S --netrc-optional "http: +//mirror.jre655.com/CPAN/modules/02packages.details.txt.gz" > "/User +s/me/.cpan/sources/modules/02packages.details.txt.gz.tmp13888"") returned status 6 (wstat 1536), left /Users/me/.cpan/sources/modules/02packages.details.txt.gz.tmp13888 wit +h size 0 Warning: no success downloading '/Users/me/.cpan/sources/modules/0 +2packages.details.txt.gz.tmp13888'. Giving up on it. Fetching with LWP: http://mirrors.sohu.com/CPAN/modules/02packages.details.txt.gz
I'd like to know why it fails and how to fix it. Failing that, I'd like to know another way to load the module, Thanks

Replies are listed 'Best First'.
Re: Trouble with MCPAN
by marto (Cardinal) on Apr 01, 2024 at 06:44 UTC

    Mirrors haven't been active for a while. See CPAN Mirror Network. Run cpan then set the mirror:

    o conf urllist www.cpan.org o conf commit

    Alternatively use cpanm.

Re: Trouble with MCPAN
by Anonymous Monk on Apr 01, 2024 at 12:24 UTC

    ... and be careful modifying the Perl that comes with macOS. I broke upgrades that way once.

      ... and be careful modifying the Perl that comes with macOS.

      That ^

      I *highly* recommend installing perlbrew and using a perlbrew perl for your own tasks, and leave the system perl alone.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11158611]
Approved by marto
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (9)
As of 2024-05-21 13:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found