-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
I am absolutely new on lua, and so far I am having problem getting the test script to run.
I've installed lua and luarocks (I think..) and I did
sudo luarocks install --server=http://rocks.moonscript.org luajwt
which installed some files under /usr/local/share/lua
$ ls
cjson json2lua.lua lua2json.lua luajwt.lua luarocks
I also see
/usr/local/lib/lua/5.1 $ ls
base64.so cjson.so crypto.so
Now.. when I run the test script it fails on the first line.
$ lua test.lua
lua: test.lua:1: module 'luajwt' not found:
no field package.preload['luajwt']
no file './luajwt.lua'
no file '/usr/share/lua/5.1/luajwt.lua'
no file '/usr/share/lua/5.1/luajwt/init.lua'
no file '/usr/lib64/lua/5.1/luajwt.lua'
no file '/usr/lib64/lua/5.1/luajwt/init.lua'
no file './luajwt.so'
no file '/usr/lib64/lua/5.1/luajwt.so'
no file '/usr/lib64/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
test.lua:1: in main chunk
[C]: ?
So I added the path on LUA_PATH
export LUA_PATH=/usr/local/share/lua/5.1/luajwt.lua
lua test.lua
which now gives..
lua: /usr/local/share/lua/5.1/luajwt.lua:1: loop or previous error loading module 'cjson'
stack traceback:
[C]: in function 'require'
/usr/local/share/lua/5.1/luajwt.lua:1: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.1/luajwt.lua:1: in main chunk
[C]: in function 'require'
test.lua:1: in main chunk
[C]: ?
Do I need to give all of the dependencies in the PATH individually, or is there a better way?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels