Hello其他程序员,
我是Lua世界的新手。我正在使用this application,并且在尝试按照自述文件运行代码时,我不断收到以下错误:
/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.
有些人有similar errors,但我认为这个来源不同。我也认为这个模块的镜像不太可能发生故障。
Lua版本:5.2.3
在更新了&&&升级后的所有内容后,使用sudo apt-get install lua5.2
安装。
感谢您的帮助!
最佳,
Hichame
答案 0 :(得分:2)
对于遇到此问题的其他人,我设法使用:git config --global url.https://github.com/.insteadOf git://github.com/
对于文档,您可能还有兴趣知道可以使用以下方法手动安装lua模块:
git clone <module-repo>
cd <module-repo-directory>
sudo luarocks make