500 Internal error when using lua-resty-string

121 views
Skip to first unread message

Ronneil Camara

unread,
Feb 10, 2018, 9:47:02 PM2/10/18
to openresty-en
I tried lua-resty-string today - https://github.com/openresty/lua-resty-string

I'm very new to LUA. I built an Nginx from source and compiled it with LuaJIT. I'm using Ubuntu 16.04.3 

I got these errors

rcamara@nginx:~/repos/openresty-quickstart/logs$ tail -f error.log 
no file './resty/sha1.so'
no file '/usr/local/lib/lua/5.1/resty/sha1.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './resty.so'
no file '/usr/local/lib/lua/5.1/resty.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
coroutine 0:
[C]: in function 'require'
/home/rcamara/repos/openresty-quickstart/./lua/test.lua:1: in function </home/rcamara/repos/openresty-quickstart/./lua/test.lua:1>, client: 127.0.0.1, server: , request: "GET /test HTTP/1.1", host: "localhost:8080"

There are no files in /usr/local/lib/lua/5.1 but this is what I see in /usr/local/lib
rcamara@nginx:~/repos/openresty-quickstart/logs$ ls -lrt /usr/local/lib
total 1404
drwxrwsr-x 3 root staff   4096 Aug  1  2017 python3.5
drwxr-xr-x 3 root root    4096 Feb  7 16:40 lua
drwxrwsr-x 4 root staff   4096 Feb  8 14:16 python2.7
-rw-r--r-- 1 root root  160600 Feb 10 16:42 scrypt.so
-rw-r--r-- 1 root root  792892 Feb 10 20:19 libluajit-5.1.a
-rwxr-xr-x 1 root root  462304 Feb 10 20:19 libluajit-5.1.so.2.0.5
lrwxrwxrwx 1 root root      22 Feb 10 20:19 libluajit-5.1.so -> libluajit-5.1.so.2.0.5
lrwxrwxrwx 1 root root      22 Feb 10 20:19 libluajit-5.1.so.2 -> libluajit-5.1.so.2.0.5
drwxr-xr-x 2 root root    4096 Feb 10 20:19 pkgconfig

More info, not sure if it's useful for troubleshooting
rcamara@nginx:~/repos/openresty-quickstart/logs$ luajit
LuaJIT 2.0.5 -- Copyright (C) 2005-2017 Mike Pall. http://luajit.org/
JIT: ON CMOV SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc sink fuse
> print(package.path)
./?.lua;/usr/local/share/luajit-2.0.5/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua
> print(package.cpath)
./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so

What am I missing? I searched my whole file system but I didn't find sha1.so, resty.so and loadall.so

Any help would be greatly appreciated!

Neil

Ronneil Camara

unread,
Feb 11, 2018, 4:48:34 AM2/11/18
to openresty-en
I was able to fix this.
Reply all
Reply to author
Forward
0 new messages