wrk如何安装额外的lua模块

时间:2017-05-02 18:28:31

标签: macos lua wrk

我正在使用mac OSX。我通过brew和Luarocks安装了Lua。我也安装了lua套接字包。

当我从终端lua命令行界面调用local http = require("socket")时,模块加载正常。

但是,当我在我的wrk测试脚本中包含local http = require("socket")时,我不仅会出现套接字错误,还会出现其他模块错误。好像它没有在我的系统上使用Lua。

有没有办法为wrk安装依赖模块?

package.searchpath( "socket", package.path )返回/usr/local/share/lua/5.2/socket.lua

以下是参考错误

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

0 个答案:

没有答案