# Problem with drizzle-nginx module

**URL:** <https://www.ruby-forum.com/t/problem-with-drizzle-nginx-module/219731>\
**Category:** NGINX\
**Created:** [May 14, 2012, 10:14am UTC](https://www.ruby-forum.com/t/problem-with-drizzle-nginx-module/219731 "2012-05-14T10:14:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [May 14, 2012, 10:14am UTC](https://www.ruby-forum.com/t/problem-with-drizzle-nginx-module/219731/1 "2012-05-14T10:14:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sparsh\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/5e9695/32.png) [@Sparsh\_G](https://www.ruby-forum.com/u/Sparsh_G)\
**Post date:** [May 14, 2012, 10:19am UTC](https://www.ruby-forum.com/t/problem-with-drizzle-nginx-module/219731/2 "2012-05-14T10:19:45Z")

</div>

On Mon, May 14, 2012 at 4:13 PM, Sparsh G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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 🙂  
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:

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 🙂

Regards,  
-agentzh

---

<div class="post-metadata">

**Author:** ![Sparsh\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/5e9695/32.png) [@Sparsh\_G](https://www.ruby-forum.com/u/Sparsh_G)\
**Post date:** [May 14, 2012, 10:45am UTC](https://www.ruby-forum.com/t/problem-with-drizzle-nginx-module/219731/3 "2012-05-14T10:45:52Z")

</div>

Thanks agentzh, I can confirm that this works 🙂

-Sparsh G.

---

<div class="post-metadata">

**Author:** ![Sparsh\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/5e9695/32.png) [@Sparsh\_G](https://www.ruby-forum.com/u/Sparsh_G)\
**Post date:** [May 14, 2012, 10:42am UTC](https://www.ruby-forum.com/t/problem-with-drizzle-nginx-module/219731/4 "2012-05-14T10:42:44Z")

</div>

On Mon, May 14, 2012 at 4:18 PM, agentzh [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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 😛

Regards,  
-agentzh
