2012-03-06 34 views
6

我正在用lua支持構建nginx,如下所示。嘗試使用luajit支持來構建nginx,但使用libluajit-5.1.so.2:無法打開共享對象文件

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 

我仍然得到錯誤。我沒有想法。

感謝

+3

有ü嘗試運行這個命令:'ldconfig' – 2012-05-08 08:03:14

+0

謝謝你好,這個命令做的伎倆! – Arseniy 2013-11-19 11:01:51

回答

3
# Export the Library Path 
export LD_LIBRARY_PATH=/usr/local/lib/:/opt/drizzle/lib/:$LD_LIBRARY_PATH 
相關問題