module 'bit' not found:No LuaRocks module found for bit

Torch框架运行错误

/torch/install/share/lua/5.1/trepl/init.lua:389: module 'bit' not found:No LuaRocks module found for bit
        no field package.preload['bit']
        no file '/home/zhwzhong/.luarocks/share/lua/5.1/bit.lua'
        no file '/home/zhwzhong/.luarocks/share/lua/5.1/bit/init.lua'
        no file '/home/zhwzhong/torch/install/share/lua/5.1/bit.lua'
        no file '/home/zhwzhong/torch/install/share/lua/5.1/bit/init.lua'
        no file './bit.lua'
        no file '/home/zhwzhong/torch/install/share/luajit-2.1.0-beta1/bit.lua'
        no file '/usr/local/share/lua/5.1/bit.lua'
        no file '/usr/local/share/lua/5.1/bit/init.lua'
        no file '/home/zhwzhong/.luarocks/lib/lua/5.1/bit.so'
        no file '/home/zhwzhong/torch/install/lib/lua/5.1/bit.so'
        no file '/home/zhwzhong/torch/install/lib/bit.so'
        no file './bit.so'
        no file '/usr/local/lib/lua/5.1/bit.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'

方法

luarocks install luabitop

参考

亲测有效

你可能感兴趣的:(lua)