Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

nginx

lua

I am building 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

Seems to compile ok.

When I start 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

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

I then add:

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

I still get the error. I am out of ideas.

Thanks

like image 429
Tampa Avatar asked Mar 06 '12 11:03

Tampa


1 Answers

# Export the Library Path
export LD_LIBRARY_PATH=/usr/local/lib/:/opt/drizzle/lib/:$LD_LIBRARY_PATH
like image 163
Maanas Royy Avatar answered Sep 22 '22 06:09

Maanas Royy