Lua要求包不';行不通

Lua要求包不';行不通,lua,Lua,升级我的torch包之后,所有的东西都能在提示符下正常工作,但是,当我试图编写脚本并通过命令行运行它时,每个require包都不能工作。我对所有的包都有相同的消息,比如require'torch' module 'torch' not found: no field package.preload['torch'] no file '/usr/local/share/lua/5.2/torch.lua' no file '/usr/local/share/lua/5.2/

升级我的torch包之后,所有的东西都能在提示符下正常工作,但是,当我试图编写脚本并通过命令行运行它时,每个require包都不能工作。我对所有的包都有相同的消息,比如
require'torch'

module 'torch' not found:
    no field package.preload['torch']
    no file '/usr/local/share/lua/5.2/torch.lua'
    no file '/usr/local/share/lua/5.2/torch/init.lua'
    no file '/usr/local/lib/lua/5.2/torch.lua'
    no file '/usr/local/lib/lua/5.2/torch/init.lua'
    no file '/usr/share/lua/5.2/torch.lua'
    no file '/usr/share/lua/5.2/torch/init.lua'
    no file './torch.lua'
    no file '/usr/local/lib/lua/5.2/torch.so'
    no file '/usr/lib/x86_64-linux-gnu/lua/5.2/torch.so'
    no file '/usr/lib/lua/5.2/torch.so'
    no file '/usr/local/lib/lua/5.2/loadall.so'
    no file './torch.so'

仍然无法工作,我收到以下错误消息:lua:从文件'/usr/local/lib/lua/5.1/libpaths.so':/usr/local/lib/lua/5.1/libpaths.so:未定义符号:luaL_寄存器堆栈回溯:[C]:in?[C]:在函数'require'/usr/local/share/lua/5.1/path/init.lua:1:在主块[C]:在函数'require'/usr/local/share/lua/5.1/torch/init.lua:12:在主块[C]中[C]:在函数'require'CNN_Model.lua:8:在主块[C]:中?不用通过
lua
运行它,使用
lua5.1
谢谢,它现在可以工作了。但是,当我使用csvigo时,加载函数不想工作,任何建议。这一次,我收到以下错误消息:lua5.1:/usr/local/share/lua/5.1/csvigo/File。lua:103:未找到模块“ffi”:没有字段包。预加载['ffi']文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件名文件”“没有文件'/usr/lib/x86_64-linux-gnu/lua/5.1/ffi.so'无文件'/usr/lib/lua/5.1/ffi.so'无文件'/usr/local/lib/lua/5.1/loadall.so'堆栈回溯:[C]:在函数'require'/usr/local/share/lua/5.1/csvigo/file.lua:103:在函数中(尾部调用):?/usr/local/share/lua/5.1/csvigo/init.lua:77:在函数“加载”测试中。lua:24:在主块中[C]:?