Luarocks安装 'async' 和 'trepl' 失败 [错误:连接超时]

各位程序员好,

我是Lua世界中的新手。我正在使用这个应用程序,但是当我遵循它们的README文档并尝试运行代码时,我不断收到以下错误:

/usr/bin/luajit: /usr/share/lua/5.1/trepl/init.lua:383: module 'display' not found:No LuaRocks module found for display
        no field package.preload['display']
        no file '/tmp/buildd/.luarocks/share/lua/5.1/display.lua'
        no file '/tmp/buildd/.luarocks/share/lua/5.1/display/init.lua'
        no file '/usr/share/lua/5.1/display.lua'
        no file '/usr/share/lua/5.1/display/init.lua'
        no file './display.lua'
        no file '/usr/share/luajit-2.1.0-beta1/display.lua'
        no file '/usr/local/share/lua/5.1/display.lua'
        no file '/usr/local/share/lua/5.1/display/init.lua'
        no file '/gpfs01/bethge/home/hmoriceau/.luarocks/share/lua/5.1/display.lua'
        no file '/gpfs01/bethge/home/hmoriceau/.luarocks/share/lua/5.1/display/init.lua'
        no file '/tmp/buildd/.luarocks/lib/lua/5.1/display.so'
        no file '/usr/lib/lua/5.1/display.so'
        no file './display.so'
        no file '/usr/local/lib/lua/5.1/display.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file '/gpfs01/bethge/home/hmoriceau/.luarocks/lib/lua/5.1/display.so'
     stack traceback:
        [C]: in function 'error'
        /usr/share/lua/5.1/trepl/init.lua:383: in function 'require'
        stylization_train.lua:9: in main chunk
        [C]: in function 'dofile'
        /usr/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
        [C]: at 0x00406670

自然地,我尝试运行 sudo luarocks install display,但是收到以下错误:

Installing https://raw.githubusercontent.com/torch/rocks/master/display-scm-0.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/display-scm-0.rockspec... switching to 'build' mode

Missing dependencies for display:
async >= 1.0
luasocket >= 2.0

Using https://raw.githubusercontent.com/torch/rocks/master/async-scm-1.rockspec... switching to 'build' mode
Cloning into 'async'...
fatal: unable to connect to github.com:
github.com[0: 192.30.253.113]: errno=Connection timed out

Error: Failed installing dependency: https://raw.githubusercontent.com/torch/rocks/master/async-scm-1.rockspec - Failed cloning git repository.

一些人遇到了类似的错误,但我认为这个错误的来源不同。我还认为,这个模块的镜像不太可能出现问题。

Lua版本:5.2.3 使用sudo apt-get install lua5.2进行安装后,更新和升级了所有内容。

感谢您的帮助!

最好的祝福,

Hichame

点赞
用户4905321
用户4905321

如果还有其他人遇到了这个问题,我成功地解决了它,使用了以下命令:git config --global url.https://github.com/.insteadOf git://github.com/

关于文档,你可能还想知道,你可以手动安装 lua 模块,命令如下:

git clone <module-repo>
cd <module-repo-directory>
sudo luarocks make
2016-07-04 08:30:51