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

I am new in perl, I need Bio::SeqIO to deal with my data recently, so I use cpan, but there is an error that indicating a proxy authentication is needed:

install Bio::SeqIO Fetching with LWP: http://mirrors.163.com/cpan/authors/01mailrc.txt.gz Proxy authentication needed! (Note: to permanently configure username and password run o conf proxy_user your_username o conf proxy_pass your_password ) Username: Warning: Term::ReadKey seems not to be available, your password will b +e echoed to the terminal! Password: Trying with /usr/bin/wget -O "/home/zluna/.cpan/sources/authors/01mailrc.txt.g +z.tmp32465" to get http://mirrors.163.com/cpan/authors/01mailrc.txt.gz --2014-11-05 20:53:42-- http://mirrors.163.com/cpan/authors/01mailrc. +txt.gz Connecting to 117.59.217.228:80... connected. Proxy request sent, awaiting response... Read error (Connection timed +out) in headers. Retrying. --2014-11-05 21:08:59-- (try: 2) http://mirrors.163.com/cpan/authors +/01mailrc.txt.gz Connecting to 117.59.217.228:80... connected. Proxy request sent, awaiting response... ^C Function system("/usr/bin/wget -O "/home/zluna/.cpan/sources/autho +rs/01mailrc.txt.gz.tmp32465" "http://mirrors.163.com/cpan/authors/01m +ailrc.txt.gz" ") returned status 0 (wstat 2), left /home/zluna/.cpan/sources/authors/01mailrc.txt.gz.tmp32465 with size 0 Warning: no success downloading '/home/zluna/.cpan/sources/authors +/01mailrc.txt.gz.tmp32465'. Giving up on it. Proxy authentication needed! (Note: to permanently configure username and password run o conf proxy_user your_username o conf proxy_pass your_password ) Username: ^CCaught SIGINT, trying to continue ^CGot another SIGINT

After wait for a long time, I have to cancel it. How could I fix the problem?

Replies are listed 'Best First'.
Re: I can not install perl modules via LWP
by choroba (Cardinal) on Nov 05, 2014 at 13:32 UTC
    Hi i19870503, welcome to the Monastery!

    Did you specify the username and password? You can use the commands shown in the output (o conf proxy_...) to stop the prompt appearing every time you need to download something.

    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
      Hi choroba, thanks for reply! Here is the o conf /proxy/ results.
      cpan[5]> o conf /proxy/ $CPAN::Config options from /home/zluna/.cpan/CPAN/MyConfig.pm: ftp_proxy [] http_proxy [] no_proxy [localhost,127.0.0.0/8,::1] proxy_pass undef proxy_user [] cpan[7]> i Fetching with LWP: http://mirrors.163.com/cpan/authors/01mailrc.txt.gz LWP failed with code[500] message[read timeout] Proxy authentication needed! (Note: to permanently configure username and password run o conf proxy_user your_username o conf proxy_pass your_password )
      In my opinin, I did not set any proxy and I also don't want to use proxy for download modules. But still can not install the modules, however, I can download the modules by "wget" and then put them to the folders.
        There seems to be a proxy set on your system. wget might be able to access it thanks to environment variables - try
        echo $http_proxy $HTTP_PROXY

        in your shell. You should get the output as

        http://username:password@proxy-url
        لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re: I can not install perl modules via LWP ( cpanm )
by Anonymous Monk on Nov 06, 2014 at 01:18 UTC
Re: I can not install perl modules via LWP
by AlwaysLearn1ng (Initiate) on May 12, 2015 at 09:54 UTC

    I also get this on some modules (not all). For example I can run this without proxy prompts:

    export -n HTTP_PROXY; perl -MCPAN -e "install Email::MIME"

    But this prompts for proxy credentials:

    export -n HTTP_PROXY; perl -MCPAN -e "install Test::NoWarnings" LWP failed with code[403] message[Forbidden] Proxy authentication needed!

    I think it's a bogus message as Proxy Authentication Required is HTTP/407, not HTTP/403, but maybe CPAN is blocking specific modules at the origin server for some reason?

      but maybe CPAN is blocking specific modules at the origin server for some reason?

      No :)