Hello!
2014-10-17 1:45 GMT-07:00 张君:
> 春哥,不好意思又打扰了,上次我遇到了dyld 的问题,我解决掉了,我把 lua5.1,lua5.2,luajit
> 卸载掉了重新安装了ngx_openresty-1.7.4.1/
> 运行良好,但是我想要安装 lua-phpserialize ,我就去安装了 luarocks
> --prefix=/usr/local/openresty/luajit --sysconfdir=/usr/local/luarocks/conf
> --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1
> 安装是成功的,但是
> /usr/local/openresty/luajit/bin/luarocks -v
>
> dyld: Library not loaded: /usr/local/lib/liblua.5.2.dylib
>
你的 luarocks 还是用的 Lua 5.2. 在构造 luarocks 时再添加下面这几个选项:
--with-lua=/usr/local/openresty/luajit/bin/luajit-2.1.0-alpha
--lua-version=5.1
另外,不建议把 --sysconfdir=PATH 的 PATH 指向系统的 luarocks 配置,直接用它的默认值就好了。
其实像这样把 luarocks 直接安装进 OpenResty 的 luajit 安装目录是很污染的,是很糟糕的一个 hack. 我将在
OpenResty 中集成一个包管理系统(同时打通到 luarocks 的 fallback)。
Regards,
-agentzh