Using CPAN with a proxy failing after o conf init /proxy/

后端 未结 4 481
灰色年华
灰色年华 2020-12-14 19:14

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

相关标签:
4条回答
  • 2020-12-14 19:36

    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.

    0 讨论(0)
  • 2020-12-14 19:50

    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

    0 讨论(0)
  • 2020-12-14 19:52
    [root@localhost ~] cpan
    

    Terminal does not support AddHistory.

    cpan shell -- CPAN exploration and modules installation (v1.9800) Enter 'h' for help.

    list my download url

    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

    add CPAN mirror list

    cpan[2]> o conf urllist push http://httpupdate3.cpanel.net/CPAN/
    

    Please use 'o conf commit' to make the config permanent!

    commit

    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

    0 讨论(0)
  • 2020-12-14 19:57

    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.

    0 讨论(0)
提交回复
热议问题