I have a Linux box in a corporate environment in which web access is gated through a proxy which requires authentication.
During a first run of cpan it auto configu
You can try using this before calling cpan
:
export http_proxy=http://my_net_id:my_net_pwd@10.12.8.9:3128/
This way maybe curl
will use the proxy.
you need to provide absolute proxy URL address for configure CPAN proxy settings . don't worry instead of providing simply IP address and port number please provide as given below.
cpan> o conf init /proxy/
Your ftp_proxy? [] ftp://10.12.8.9:3128
Your http_proxy? [] http://10.12.8.9:3128
Your no_proxy? []
and provide username and password if needed (Make sure that you have the downloading permission )
I also have same the issue, but now its working for me. I should also work for you.
BR Jerry James
[root@localhost ~] cpan
Terminal does not support AddHistory.
cpan shell -- CPAN exploration and modules installation (v1.9800) Enter 'h' for help.
cpan[1]> o conf urllist
urllist
0 [http://mirror.waia.asn.au/pub/cpan/]
1 [ftp://mirrors.coopvgg.com.ar/CPAN/]
2 [http://httpupdate3.cpanel.net/CPAN/]
Type 'o conf' to view all configuration items
cpan[2]> o conf urllist push http://httpupdate3.cpanel.net/CPAN/
Please use 'o conf commit' to make the config permanent!
cpan[3]> o conf commit
commit: wrote '/root/.cpan/CPAN/MyConfig.pm'
cpan[4]>
now you can install perl module again like : cpan -i Text::Template
Install LWP. The cpan utility is using curl, I guess because it couldn't load LWP. No proxy parameters are being passed to curl, so you need the export http_proxy=http://host:port/ before running the command.
Or, if you can install LWP using your distribution's package manager, then it should configure the proxy access correctly.