Perl Windows CPANM proxy issue [duplicate]

谁说胖子不能爱 提交于 2019-12-11 13:58:40

问题


After solving a few issues, I've Succeeded with CPAN on my Work Windows 7 Machine with DwimPerl via perl -MCPAN -e shell and o conf init /proxy/

ftp:
http: http://192.168.1.1:8080
no:
Username: Chris@work
Password: SuperDeDuperSecretPassword

CPAN works. I'm able to install/build.

It seems that no matter what I do, CPANM doesn't want to get past the proxy:

C:\>cpanm WWW::Mechanize
! Finding WWW::Mechanize on cpanmetadb failed.
501 protocol scheme 'wwwproxy.work.com' is not supported
C:\> cpan WWW::Mechanize
...
...
...
c:\Programs\Dwimperl\c\bin\dmake.exe INSTALL -- OK

What's different between the two and what would cause CPAN to succeed while CPANM fails with a 501?


回答1:


10 minutes after I posted this, I had a brief conversation with a coworker. He mentioned environment variables. I verified that I had indeed added Windows Environment variables previously. A quick update to them:

User Variables for Chris:
HTTP_Proxy:  http://192.168.1.1:8080
HTTP_proxy_pass: SuperDeDuperSecretPassword
HTTP_proxy_user: Chris@Work

I changed it from wwwproxy.work.org to http://192.168.1.1:80 (CPAN complained without the HTTP, so I think it needed the full URL as well).

AND I had a typo in my name :(

CPANM works now.



来源:https://stackoverflow.com/questions/29636778/perl-windows-cpanm-proxy-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!