4

我无法在 perl 中安装任何需要代理身份验证的模块。我使用 cpan[2]> o conf init /proxy/ 为 perl 配置了代理凭据

当我尝试安装任何软件包时出现以下错误。请帮忙。

cpan[4]> i 'XML::RAI'
←[32mGoing to read 'C:\Perl\cpan\Metadata'←[0m
←[32m  Database was generated on Wed, 26 Sep 2012 10:43:03 GMT←[0m
←[32mFetching with LWP:
http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz←[0m
The keep_alive option must be enabled for NTLM authentication to work.  NTLM authentication aborted.
Catching error: "Undefined subroutine &CPAN::HTTP::Credentials::_clear_non_proxy_credentials called at C:\\Perl\\lib/CPAN/HTTP/Cred
ne 391
        CPAN::shell() called at C:/Perl/lib/App/Cpan.pm line 295
        App::Cpan::_process_options('App::Cpan') called at C:/Perl/lib/App/Cpan.pm line 364
        App::Cpan::run('App::Cpan') called at C:\Perl\bin/cpan.bat line 24
←[32m←[0m

乌玛·马赫什

4

2 回答 2

2

You have to set proxy settings from the cpan

perl -MCPAN -e shell
cpan[2]> o conf init /proxy/
Your ftp_proxy? [a.b.c.d] a.b.c.d:port
Your http_proxy? [a.b.c.d] a.b.c.d:port
Your no_proxy? [] a.b.c.d:port
cpan[3]> o conf commit
于 2012-12-30T12:52:05.447 回答
1

如果您存储的密码不正确,可能会触发此错误。

于 2013-08-22T15:41:49.517 回答