/usr/local/nginx/sbin/nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open

centos 6 7 检测配置文件 /usr/local/nginx/sbin/nginx -t
出现以下错误:

/usr/local/nginx/sbin/nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory
解决方案:
yum -y install lua*
/usr/local/nginx/sbin/nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open

centos7 可能会不生效报以下错。/usr/local/nginx/sbin/nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open
1 下载安装LuaJIT
[[email protected] mysql3306]# cd /usr/local/src
[[email protected] src]# wget http://luajit.org/download/LuaJIT-2.0.5.tar.gz
[[email protected] src]# tar -xvf LuaJIT-2.0.5.tar.gz
[[email protected] src]# cd LuaJIT-2.0.5

[[email protected] LuaJIT-2.0.5]# make && make install

  1. 重新检测,成功。
    /usr/local/nginx/sbin/nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open