使用local cjson_safe = require "cjson.safe", 报'cjson.safe' not found, openresty不支持cjson.safe吗 2014-02-24 coderesty --
我从http://www.kyne.com.au/~mark/software/lua-cjson.php下载2.1.0的, 然后编译, 把cjson.so拷贝过去还是不行呀 2014-02-24 coderesty 发件人:smallfish <small...@gmail.com> 发送时间:2014-02-24 20:10 主题:Re: [openresty] LuaCjsonLibrary问题 收件人:"openresty@googlegroups.com"<openresty@googlegroups.com> 抄送: openresty包里的lua-cjson版本是1.x,cjson.safe应该是2.x版本中的 -- smallfish http://chenxiaoyu.org 2014-02-24 20:03 GMT+08:00 coderesty <code...@gmail.com>: 使用local cjson_safe = require "cjson.safe", 报'cjson.safe' not found, openresty不支持cjson.safe吗 2014-02-24 coderesty -- -- --
Hello! 2014-02-24 4:03 GMT-08:00 coderesty: > 使用local cjson_safe = require "cjson.safe", 报'cjson.safe' not found, > openresty不支持cjson.safe吗 > openresty 目前包含的是较老版本的 lua-cjson 库。而 cjson.safe 是最新的 lua-cjson 2.1.0 发布引入的。 下一个 openresty 发布将会包含一个基于 lua-cjson 2.1.0 的版本。 在此之前,你可以自己下载和安装 lua-cjson 2.1.0,记得自己配置 lua_package_cpath 指令: https://github.com/chaoslawful/lua-nginx-module#lua_package_cpath 一般不建议自己覆盖 openresty 安装目录下的文件。 Regards, -agentzh
Hello! 2014-02-24 17:05 GMT-08:00 Yichun Zhang (agentzh): > openresty 目前包含的是较老版本的 lua-cjson 库。而 cjson.safe 是最新的 lua-cjson 2.1.0 发布引入的。 > > 下一个 openresty 发布将会包含一个基于 lua-cjson 2.1.0 的版本。 > 请尝试下面这个预发布版的 openresty: http://openresty.org/download/ngx_openresty-1.5.9.1rc4.tar.gz 它包含了 lua-cjson 2.1.0.1(源自我在 github 上的lua-cjson分支:https://github.com/agentzh/lua-cjson ) 欢迎测试并反馈结果 :) Thanks! -agentzh