ts-lua icon indicating copy to clipboard operation
ts-lua copied to clipboard

use cjson got runtime error: undefined symbol: lua_getfield

Open portl4t opened this issue 9 years ago • 1 comments

local cjson = require "cjson"

Some user will use cjson in lua script, and got runtime error, e.g.

"...failed: error loading module 'cjson' from file ... undefined symbol: lua_getfield @ts_lua_util.c:152"

portl4t avatar Aug 07 '16 12:08 portl4t

This problem has serveral solutions:

Before we configure ats, we can execute the following command first: export LIBS=-llua-5.1 and after we build over, the binary traffic_server will require the liblua-5.1.so, and it works.

There is also another solution which is not recommended: Before we execute the traffic_server, we can execute the following command first: export LD_PRELOAD=/usr/lib64/liblua-5.1.so

I think the first solution is good.

portl4t avatar Aug 07 '16 12:08 portl4t