Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In order to try out varnish for an upcoming project I installed it on an ubuntu server using this tutorial: http://varnish-cache.org/wiki/InstallationOnUbuntuDapper

The build process worked without any errors, but I cant start the varnish demon. I always get the error message

varnishd: error while loading shared libraries: libvarnish.so.1: cannot open shared object file: No such file or directory

But /usr/local/lib/libvarnish.so.1 clearly exists.

How can I tell varnish to look in that directory and load the library?

UPDATE

To answer the questions of cd34

    ldd `which varnishd`

outputs:

    linux-vdso.so.2 =>  (0x00007fff0a360000)
    libvarnish.so.1 => not found
    libvarnishcompat.so.1 => not found
    libvcl.so.1 => /usr/local/lib/libvcl.so.1 (0x00007f2a6fcaf000)
    libdl.so.2 => /lib/libdl.so.2 (0x00007f2a6faab000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x00007f2a6f88f000)
    libnsl.so.1 => /lib/libnsl.so.1 (0x00007f2a6f675000)
    libm.so.6 => /lib/libm.so.6 (0x00007f2a6f3f1000)
    libc.so.6 => /lib/libc.so.6 (0x00007f2a6f082000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f2a6fec7000)

Do you have varnish in two places on the machine, one from a previous attempt?
-> No, varnish is only installed once

Are you using 2.1.0 which was recently released?
Yes, I am using the most recent version

share|improve this question

3 Answers 3

up vote 4 down vote accepted

Try running sudo ldconfig to rebuild the library cache.

share|improve this answer
    
So easy! That did it, thank you very much! –  Max Apr 14 '10 at 13:12
ldd `which varnishd`

Where is varnish looking for the libraries? Do you have varnish in two places on the machine, one from a previous attempt? Did you specify any directory paths when you did ./configure ?

Are you using 2.1.0 which was recently released?

share|improve this answer
    
Good questions and thanks for your answer, please see my edit. –  Max Apr 11 '10 at 17:07
    
ls -al /usr/local/lib/libvarnish.so.1 if that doesn't find it, try: find / -name libvarnish.so.1 -print find / -name libvarnishcompat.so.1 -print is /usr/local/lib/libvarnish.so.1 a symlink that points to an invalid file? –  deleted Apr 11 '10 at 18:53

Try running sudo ldconfig to rebuild the library cache.

helpt me to thankz...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.