【发布时间】:2022-04-09 07:10:54
【问题描述】:
我正在尝试使用 torch7 和 LUA 运行代码,但出现此错误。
usr/local/torch/install/share/lua/5.2/trepl/init.lua:389: module 'bit' not found: No LuaRocks module found for 'bit'
no field package.preload['bit']
no file '/root/.luarocks/share/lua/5.2/bit.lua'
no file '/root/.luarocks/share/lua/5.2/bit/init.lua'
no file '/usr/local/torch/install/share/lua/5.2/bit.lua'
no file '/usr/local/torch/install/share/lua/5.2/bit/init.lua'
no file '/usr/local/torch/install/lib/lua/5.2/bit.lua'
no file '/usr/local/torch/install/lib/lua/5.2/bit/init.lua'
no file './bit.lua'
no file '/home/shaurovd/.luarocks/share/lua/5.2/bit.lua'
no file '/home/shaurovd/.luarocks/share/lua/5.2/bit/init.lua'
no file '/root/.luarocks/lib/lua/5.2/bit.so'
no file '/usr/local/torch/install/lib/lua/5.2/bit.so'
no file '/usr/local/torch/install/lib/lua/5.2/loadall.so'
no file './bit.so'
no file '/home/shaurovd/.luarocks/lib/lua/5.2/bit.so'
stack traceback:
[C]: in function 'error'
/usr/local/torch/install/share/lua/5.2/trepl/init.lua:389: in function 'require'
train.lua:16: in main chunk
[C]: in function 'dofile'
...ocal/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: in ?
Segmentation fault (core dumped)
我尝试在我的个人资料中本地安装“位”,因为我没有正在使用的服务器(Ubuntu 18.04)上的写入权限:
luarocks install --deps bit --local
但它显示:Error: No results matching query were found.
我该如何解决这个问题?
【问题讨论】:
-
我认为 Torch 通常需要 LuaJIT,而不是 Lua 5.2,这可能是你的问题
-
谢谢。我也在想同样的方向。
标签: lua ubuntu-18.04 bit torch luarocks