Trying to build nginx with luajit support, but libluajit-5.1.so.2: cannot open shared objects file

I am creating nginx with lua support as follows.

export LUAJIT_LIB=/usr/local/lib/ export LUAJIT_INC=/usr/local/include/luajit-2.0/ ./configure --with-http_geoip_module --with-http_stub_status_module --with-http_ssl_module --add-module=/home/ubuntu/ngx_devel_kit --add-module=/home/ubuntu/lua-nginx-module --add-module=/home/ubuntu/redis2-nginx-module --add-module=/home/ubuntu/form-input-nginx-module make -j2 sudo make install 

It seems to compile ok.

When I run nginx, I get this error

 sudo /etc/init.d/nginx start Starting nginx: /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 

Then I place the file in question and its in / usr / local / lib / libluajit -5.1.so.2

Then add:

 LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH sudo /etc/init.d/nginx start 

I am still getting the error. I have no ideas.

thanks

+6
source share
1 answer
 # Export the Library Path export LD_LIBRARY_PATH=/usr/local/lib/:/opt/drizzle/lib/:$LD_LIBRARY_PATH 
+3
source

Source: https://habr.com/ru/post/910068/


All Articles