我正在使用lua支持构建nginx,如下所示。
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
似乎编译好了。
当我启动nginx时,我收到此错误
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
然后我找到有问题的文件,并将其放在/usr/local/lib/libluajit-5.1.so.2
中然后我添加:
LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
sudo /etc/init.d/nginx start
我仍然得到错误。我没有想法。
由于
答案 0 :(得分:4)
# Export the Library Path
export LD_LIBRARY_PATH=/usr/local/lib/:/opt/drizzle/lib/:$LD_LIBRARY_PATH