tengine安裝ngx_http_lua_module


從http://luajit.org/download.html下載的luajit來安裝tengine上,啟動時報錯如下

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's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)

先卸載原有luajit

make uninstall

然后從https://github.com/openresty/luajit2下載

git clone https://github.com/openresty/luajit2
make
&& make install

tengine2.0.3下

./configure --with-http_lua_module \
--with-luajit-lib=/usr/local/lib/ \
--with-luajit-inc=/usr/local/include/luajit-2.1/ \
--with-lua-inc=/usr/local/include/luajit-2.1/ \
--with-lua-lib=/usr/local/lib/
make && make install

問題:

[root@localhost sbin]# ./nginx -m 
./nginx: error while loading shared libraries: libluajit-***.so.2: cannot open shared object file: No such file or directory

使用一下命令解決:

echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf
ldconfig 

tips:

https://github.com/loveshell/ngx_lua_waf

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM