joshua chris
joshua chris

Reputation: 53

is there a way to use the lua command require to load up the luafilesystem?

i've been trying to install the api but it's not working kept getting this error

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 ?

also i can't install luarocks for the simple installing i just need it to be a stand alone program so it will temporary , be installed and it can be portable.

Upvotes: 0

Views: 101

Answers (1)

Paul Kulchenko
Paul Kulchenko

Reputation: 26794

You seem to be loading the module as Desktop/luafilesystem-master, but in most cases it should be require "lfs" and you should have lfs.so file available in one of those paths listed in the error message.

If you are compiling from the source, then the result of that compilation will be lfs.so file that you need to place in one of those locations.

Upvotes: 1

Related Questions