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

ilovelnmp 276
2019-03-15 提问
1 个回答
0

建议直接用 openresty直接打包好的 包 进行安装吧.

看你这报错 肯定是LuaJIT版本 不可用

http://openresty.org/en/insta...

撰写答案

你可能感兴趣的

推广链接