Problem with drizzle-nginx module

I followed the instructions and build my nginx without any errors, but I
am
facing issues starting the server. I am getting an error:
./nginx: error while loading shared libraries: libdrizzle.so.1: cannot
open
shared object file: No such file or directory

I tried ldd and found that it is unable to link to my libDrizzle
libraries.
root@lb1:/usr/local/nginx/sbin# ldd ./nginx
linux-vdso.so.1 => (0x00007fff2e761000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f57bfa06000)
libm.so.6 => /lib/libm.so.6 (0x00007f57bf783000)
liblua5.1.so.0 => /usr/lib/liblua5.1.so.0 (0x00007f57bf556000)
libdrizzle.so.1 => not found
libssl.so.0.9.8 => /lib/libssl.so.0.9.8 (0x00007f57bf304000)
libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0x00007f57bef77000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f57bed73000)
libz.so.1 => /lib/libz.so.1 (0x00007f57beb5b000)
libGeoIP.so.1 => /usr/lib/libGeoIP.so.1 (0x00007f57be922000)
libc.so.6 => /lib/libc.so.6 (0x00007f57be59e000)
/lib64/ld-linux-x86-64.so.2 (0x00007f57bfc29000)

I exported the required paths as per documentation
LIBDRIZZLE_INC=/usr/local/include/libdrizzle-1.0
LIBDRIZZLE_LIB=/usr/local/lib

root@lb1:/usr/local/lib# ls -l
total 292
-rwxr-xr-x 1 root root 957 May 11 11:04 libdrizzle.la
lrwxrwxrwx 1 root root 19 May 11 11:04 libdrizzle.so ->
libdrizzle.so.1.1.0
lrwxrwxrwx 1 root root 19 May 11 11:04 libdrizzle.so.1 ->
libdrizzle.so.1.1.0
-rwxr-xr-x 1 root root 279379 May 11 11:04 libdrizzle.so.1.1.0
drwxr-xr-x 2 root root 4096 May 11 11:04 pkgconfig
drwxrwsr-x 4 root staff 4096 Oct 8 2011 python2.6

root@lb1:/usr/local/include/libdrizzle-1.0# ls -l
total 4
drwxr-xr-x 2 root root 4096 May 11 11:04 libdrizzle

What am I doing wrong or how can I fix this issue.

Thanks
Sparsh G.

On Mon, May 14, 2012 at 4:13 PM, Sparsh G. [email protected]
wrote:

I followed the instructions and build my nginx without any errors, but I am
facing issues starting the server. I am getting an error:
./nginx: error while loading shared libraries: libdrizzle.so.1: cannot open
shared object file: No such file or directory

You need to tell your system where to look for libdrizzle.so :slight_smile:
Basically there’s at least two ways (assuming your libdrizzle.so is
under /usr/local/lib/):

  1. Specify the LD_LIBRARY_PATH environment before starting your nginx:

    export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

  2. Specify the run path (or “rpath”) in your nginx executable by
    passing the command-line option
    –with-cc-opt=“-Wl,-rpath,/usr/local/lib” to your nginx’s ./configure
    script.

I think the 2nd approach is better for production :slight_smile:

Regards,
-agentzh

Thanks agentzh, I can confirm that this works :slight_smile:

-Sparsh G.

On Mon, May 14, 2012 at 4:18 PM, agentzh [email protected] wrote:

  1. Specify the run path (or “rpath”) in your nginx executable by
    passing the command-line option
    –with-cc-opt=“-Wl,-rpath,/usr/local/lib” to your nginx’s ./configure
    script.

Sorry, there’s a typo here. it should be --with-ld-opt, rather than
–with-cc-opt :stuck_out_tongue:

Regards,
-agentzh