nginx: [alert] 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)

19 août 2019 par: Benoit Bonneville

When you start your nginx you got the following error :

nginx: [alert] 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

The message is quite explicit, your LUAJIT is not an OpenRestry, or it can be an old OpenResty one.

Nginx Compilation Process

When you compile your nginx with LUA you must specify those env variables:
export LUAJIT_LIB=/usr/local/lib
export LUAJIT_INC=/usr/local/include/luajit-2.0

In the luajit.h you must find the following const declaration : OPENRESTY_LUAJIT

cat $LUAJIT_INC/luajit.h | grep OPENRESTY_LUAJIT

If not, your LUAJIT install is not an openresty compatible one, it could be an old openresty one.

History of the change

The define has been added on commit : https://github.com/openresty/luajit2/commit/515fd8d1682caf1f0516ddcb33f97b1ae5b02590

This commit is in a branch for version 2.1, so all version 2.0 will display this warning.

Please take note that some 2.1 « openresty/libluajit2 » tags are displaying this warning too.
Example, all the « 2.1.0 beta » are too old.

Filed under: Non classé

Répondre