2
votes

I am working on a nodejs project. Its working in my laptop but when I tried to run it in my desktop it is throwing error :

libcouchbase.so.2: cannot open shared object file: No such file or directory

Can anybody suggest me what could be the wrong?

Thanks in advance

2
Install couchbase on your desktop machine. - Elliott Frisch
Just forgot to mention, I am using ubuntu14.04LTS and couchbase is installed in it. - user281076
i bet that node or a library is trying to find that couchbase library and it's not in $PATH (or some other environment variable). another possibility is couchbase itself can't find the library? - Plato
Good to hear that. But can you be more specific what environment variable is missing?? - user281076
Check your /etc/ld.so.conf (per this man page), or add that path to your LD_LIBRARY_PATH. - Elliott Frisch

2 Answers

4
votes

Maybe it could help somebody: Looks like the shared library should be in /usr/lib/libcouchbase.so.2 But the install script installed libcouchbase.so.2 to /usr/local/lib/libcouchbase.so.2. So I just linked it to /usr/lib/libcouchbase.so.2 and that works fine for me.

0
votes

You should set the NODE_PATH environment variable to the path where the shared object resides. In my case

export NODE_PATH=/usr/local/lib64

solved it.