有没有办法使用lua命令require加载luafilesystem?

时间:2017-03-10 16:23:33

标签: macos lua filesystems

我一直在尝试安装api,但它无法正常工作 不断收到此错误

stdin:1: module 'Desktop/luafilesystem-master' not found:
no field package.preload['Desktop/luafilesystem-master']
no file '/usr/local/share/lua/5.3/Desktop/luafilesystem-master.lua'
no file '/usr/local/share/lua/5.3/Desktop/luafilesystem-master/init.lua'
no file '/usr/local/lib/lua/5.3/Desktop/luafilesystem-master.lua'
no file '/usr/local/lib/lua/5.3/Desktop/luafilesystem-master/init.lua'
no file './Desktop/luafilesystem-master.lua'
no file './Desktop/luafilesystem-master/init.lua'
no file '/usr/local/lib/lua/5.3/Desktop/luafilesystem-master.so'
no file '/usr/local/lib/lua/5.3/loadall.so'
no file './Desktop/luafilesystem-master.so'
stack traceback:
[C]: in function 'require'
stdin:1: in main chunk
[C]: in ?

我也无法安装luarocks用于简单的安装我只需要它是一个独立的程序,所以它将是临时的,安装它可以是便携式的。

1 个答案:

答案 0 :(得分:1)

您似乎正在将模块加载为Desktop/luafilesystem-master,但在大多数情况下,它应该是require "lfs",并且您应该在错误消息中列出的其中一个路径中提供lfs.so文件

如果您是从源代码编译的,那么该编译的结果将是您需要放置在其中一个位置的lfs.so文件。

相关问题