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/...

阅读 9.4k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题