使用 Panda 但在代理后面为 Perl 6 安装模块

Installing modules for Perl 6 using Panda but behind a proxy

似乎迷失在这一点上。

每当我对 panda 做任何事情时,(update/install) 我都会收到以下错误:

Could not download module metadata: Failed to connect: connection timed out.
Falling back to the curl command.
curl failed: The spawned process exited unsuccessfully (exit code: -16).
Falling back to the wget command.
wget failed as well: The spawned process exited unsuccessfully (exit code: -16). Sorry, have to give up.
  in block  at C:\rakudo\share\perl6\site\sourcesC4E003FB65304A1A6771D177815A47C2333D7E line 138
  in any  at H:\.perl616.01.1\precompC40ED80206941C844106C0BECEBD0BCE0E58E3.1454618830.87862C4E003FB6530
4A1A6771D177815A47C2333D7E line 1
  in block  at C:\rakudo\share\perl6\site\sourcesC4E003FB65304A1A6771D177815A47C2333D7E line 134
  in any  at H:\.perl616.01.1\precompC40ED80206941C844106C0BECEBD0BCE0E58E3.1454618830.87862C4E003FB6530
4A1A6771D177815A47C2333D7E line 1
  in block  at C:\rakudo\share\perl6\site\sourcesC4E003FB65304A1A6771D177815A47C2333D7E line 128
  in any  at H:\.perl616.01.1\precompC40ED80206941C844106C0BECEBD0BCE0E58E3.1454618830.87862C4E003FB6530
4A1A6771D177815A47C2333D7E line 1
  in method update at C:\rakudo\share\perl6\site\sourcesC4E003FB65304A1A6771D177815A47C2333D7E line 94
  in sub MAIN at C:\rakudo\bin\panda line 43
  in block <unit> at C:\rakudo\bin\panda line 95

我在这个博客http://perl6maven.com/how-to-install-perl6-modules上发现,评论里有人有同样的问题:

Gave it a shot, but I am behind a web proxy. So panda install Task::Star 
failed. OK, research and find that Http::UserAgent is needed. Go look for 
it, and the install instructions are "use panda install Http::UserAgent". 
Catch-22 time. Not encouraging at this point.

So I clone the Http::UserAgent from github and point panda to the local 
directory: git install ./http-useragent and still get connection timed out 
in retrieveing metadata. Any ideas?

所以...有什么想法吗?

好的,大家好,我想我已经弄明白了。仅供参考,我在 windows 上,所以请尝试阅读其他 OS 的字里行间。

我无法用 panda

做任何事情

如果您收到上述错误消息,那可能意味着您 运行 panda update 太早了。虽然几乎每个模块都会告诉您在 panda install ....

之前 运行 panda update

我现在该怎么办?

您必须删除 rakudo star 并重新安装!我注意到在重新安装 raduko 后,panda list 又开始工作了。我欣喜若狂!问题是在我 运行 panda update 之后就导致了上述错误。然后我再次尝试 运行 panda list ,令我惊讶的是 panda 现在又坏了。所以基本上,重新安装 不要 运行 panda update.

好的,现在我回到了无法连接到 github

的起点

星星必须对齐(不是真的),您才能连接到代理后面的 github。我的解决方案涉及几件事:

  • 确保你安装了最新版本的git(否则会报错)
  • git config http.proxy http://user:password@proxy.website.com:port
  • git config https.proxy http://user:password@proxy.website.com:port
  • git config --global http.proxy http://user:password@proxy.website.com:port
  • git config --global https.proxy http://user:password@proxy.website.com:port
  • git config http.sslVerify=false
  • SET http_proxy=http://user:password@proxy.website.com:port
  • SET https_proxy=http://user:password@proxy.website.com:port
  • SET GIT_PROTOCOL=https
  • SET GIT_SSL_NO_VERIFY=true

现在显然我不知道我在做什么,那里有大量的交叉设置,但我很确定我已经设置了所有这些设置所以似乎没有更多的伤害.

成功!

所以假设你已经走到这一步并且你还没有使用过 panda update,你应该能够使用 panda install ...!

安装 perl6 的模块