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

Hi,
I have recently installed Perl on my VMware machine.
Im not able to install modules using CPAN the modules not downloading it keeps retrying each time
OS: Cent os 5.8
cpan> install Bundle::LWP Use of uninitialized value in concatenation (.) or string at /usr/lib/ +perl5/5.8.8/CPAN.pm line 717, <FIN> line 2. DEBUG: c[2]$@[Can't locate HTTP/Request.pm in @INC (@INC contains: /us +r/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/si +te_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8 +.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/ +perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/l +ib/perl5/5.8.8) at /usr/lib/perl5/5.8.8/CPAN.pm line 704, <FIN> line +2. ]ret[] at /usr/lib/perl5/5.8.8/CPAN.pm line 717, <FIN> line 2. LWP not available Fetching with Net::FTP: ftp://mirrors.sohu.com/CPAN/authors/01mailrc.txt.gz Use of uninitialized value in concatenation (.) or string at /usr/lib/ +perl5/5.8.8/CPAN.pm line 717, <FIN> line 2. DEBUG: c[2]$@[Can't locate HTTP/Request.pm in @INC (@INC contains: /us +r/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/si +te_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8 +.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/ +perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/l +ib/perl5/5.8.8) at /usr/lib/perl5/5.8.8/CPAN.pm line 704, <FIN> line +2. ]ret[] at /usr/lib/perl5/5.8.8/CPAN.pm line 717, <FIN> line 2. LWP not available Trying with "/usr/bin/wget -O -" to get ftp://mirrors.sohu.com/CPAN/authors/01mailrc.txt.gz --2012-07-23 20:12:35-- ftp://mirrors.sohu.com/CPAN/authors/01mailrc. +txt.gz => `-' Resolving mirrors.sohu.com... 123.129.214.98 Connecting to mirrors.sohu.com|123.129.214.98|:21... connected. Logging in as anonymous ...
it keeps retrying every time
Trying with "/usr/bin/wget -O -" to get ftp://mirrors.sohu.com/CPAN/authors/01mailrc.txt.gz --2012-07-23 20:11:28-- ftp://mirrors.sohu.com/CPAN/authors/01mailrc. +txt.gz => `-' Resolving mirrors.sohu.com... 123.129.214.98 Connecting to mirrors.sohu.com|123.129.214.98|:21... connected. Logging in as anonymous ... Error in server response, closing control connection. Retrying. --2012-07-23 20:11:33-- ftp://mirrors.sohu.com/CPAN/authors/01mailrc. +txt.gz (try: 2) => `-' Connecting to mirrors.sohu.com|123.129.214.98|:21... connected. Logging in as anonymous ... Error in server response, closing control connection. Retrying.
Plz help me on this...

Replies are listed 'Best First'.
Re: Truble in installing CPAN moduels
by aitap (Curate) on Jul 23, 2012 at 15:04 UTC

    Are these mirrors available from the machine you are trying to install modules to? You may want to set up other mirrors using o conf urllist.

    EDIT: You may also want to yum install perl-libwww-perl, so CPAN will be able to use system LWP before installing anything else.

    Sorry if my advice was wrong.
      Thanks for the replay.
      Yes i can able to download module using "wget".
      I have installed "perl-libwww-perl" and the error says
      cpan> install CPAN::Mirrors Fetching with LWP: ftp://mirrors.sohu.com/CPAN/authors/01mailrc.txt.gz CPAN::LWP::UserAgent->new dies with Can't locate HTTP/Config.pm in @IN +C (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-mu +lti /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/ +perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor +_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linu +x-thread-multi /usr/lib/perl5/5.8.8) at /usr/lib/perl5/site_perl/5.8. +8/LWP/UserAgent.pm line 770, <FIN> line 2. Can't call method "mirror" on an undefined value at /usr/lib/perl5/5.8 +.8/CPAN.pm line 2506, <FIN> line 2.
      Update : Thanks for ur help i have manually installed the "HTTP::Config" module now its working fine.
      Once again thanks