在代理后面安装用于Torch的luarocks包。

我想使用Torch框架的nn包。我从github上下载并构建了Torch。但是当我现在执行:

    luarocks install nn

我得到了Cloning into 'nn' fatal: unable to connect to github.com错误。我的代理服务器已经配置为wget和github。两者都正常工作。我在网上搜索只找到了这个链接(https://github.com/keplerproject/luarocks/wiki/LuaRocks-through-a-proxy),所以我查找了config.lua,但是有很多,所以我向所有的config.lua添加了这个:

    proxy="proxy@port"

但是luarocks仍然不起作用。请建议一些方法。

点赞
用户4712244
用户4712244

我已经找到了一个解决方案。代理屏蔽了 git:// URL,因此改用 https:// 可以解决这个问题。命令为:

git config --global url.https://github.com/.insteadOf git://github.com/

如果不希望更改全局 git 设置,也可以在 git.lua 文件中修改 URL。

2015-05-26 19:24:23