我需要通过代理运行cpan,但当我尝试配置时,出现错误,无法首次进入cpan。
root@srv-linux01:~# cpan
CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.
Would you like to configure as much as possible automatically? [yes] no
关于代理设置:
If you're accessing the net via proxies, you can specify them in the
CPAN configuration or via environment variables. The variable in
the $CPAN::Config takes precedence.
<ftp_proxy>
Your ftp_proxy? [] http://username:password@proxyIP:Port/ <---- is ok the information?
<http_proxy>
Your http_proxy? [] http://username:password@proxyIP:Port/ <---- is ok the information?
<no_proxy>
Your no_proxy? []
If your proxy is an authenticating proxy, you can store your username
permanently. If you do not want that, just press ENTER. You will then
be asked for your username in every future session.
Your proxy user id? [] <---- username is needed again?
Your password for the authenticating proxy can also be stored
permanently on disk. If this violates your security policy, just press
ENTER. You will then be asked for the password in every future
session.
Your proxy password?
在那之前,我得到了这个。
Fetching with HTTP::Tiny:
http://www.perl.org/CPAN/MIRRORED.BY.gz
Error downloading with HTTP::Tiny: Not a CODE reference at /usr/share/perl/5.18/CPAN/HTTP/Client.pm line 112, <STDIN> line 65.
我正在使用Ubuntu Server 14.04 LTS和Perl 5.18.2。谢谢。
export http_proxy=http://httpproxy.test.com:8080/; export https_proxy=$http_proxy
- AbhiNickz