nginx中的lua执行错误,哪位朋友见过?
location /test_lua {
default_type 'text/plain';
content_by_lua 'ngx.say("hello, lua")';
}
能执行并在页面中输入hello,lua
但是在日志中会提示如下:
2019/03/13 12:38:01 [alert] 13305#0: detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
执行这部分时
access_by_lua_block {
local command = "gm convert /home/img/test_o.jpg -thumbnail 300x425 /home/img/test_lua.jpg";
os.execute(command);
}
则日志中出现以下错误,并且根本不执行gm这行,gm这行单独在linux命令行下是能执行成功的
2019/03/13 12:38:08 [alert] 13305#0: detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
sh: gm: command not found
请问以上情况是什么原因?谢谢!!!!!!!!
我的配置环境如下:(以下都是单独安装,没有安装openresty)
centos7.6
nginx 1.14.1
GraphicsMagick-1.3.31
lua-5.3.5
LuaJIT-2.0.5
zlib-1.2.11
yum install git
git clone https://github.com/simpl/ngx_...
git clone https://github.com/openresty/...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
建议直接用 openresty直接打包好的 包 进行安装吧.
看你这报错 肯定是LuaJIT版本 不可用
http://openresty.org/en/insta...