I am using mac OSX. I have Lua installed through brew and Luarocks. I have the lua sockets package installed too.
When I call local http = require("socket")
from the terminal lua command line interface, the module loads fine.
However when I include local http = require("socket")
in my wrk test scripts, I get errors not just for socket but for other modules too. It seems like its not using the Lua on my system.
Is there a way to install dependent modules for wrk?
package.searchpath( "socket", package.path )
returns /usr/local/share/lua/5.2/socket.lua
Here is the error for reference
scripts/get_call_setup.lua: scripts/get_call_setup.lua:1: module 'socket' not found:
no field package.preload['socket']
no file './socket.lua'
no file '/Users/sak/go/src/personal/wrk/obj/share/luajit-2.0.4/socket.lua'
no file '/usr/local/share/lua/5.1/socket.lua'
no file '/usr/local/share/lua/5.1/socket/init.lua'
no file '/Users/sak/go/src/personal/wrk/obj/share/lua/5.1/socket.lua'
no file '/Users/sak/go/src/personal/wrk/obj/share/lua/5.1/socket/init.lua'
no file './socket.so'
no file '/usr/local/lib/lua/5.1/socket.so'
no file '/Users/sak/go/src/personal/wrk/obj/lib/lua/5.1/socket.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
Running 3s test @ https://ccx-courier-stage.adobe.io