Sunday, April 28, 2013

ldd diagnose dependencies of a object file

Today I run into this error again: 

couldn't load file "/opt/tcl8.5.9/lib/yajltcl1.3/libyajltcl1.3.so": libyajl.so.2: cannot open shared object file:
 No such file or directory

Obviously, we are looking for libyajl.so.2 from libyajltcl1.3.so, but we can not. So I run

ldd /opt/tcl8.5.9/lib/yajltcl1.3/libyajltcl1.3.so:

linux-vdso.so.1 =>  (0x00007fff6d5ff000)
libyajl.so.2 => not found
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbc2d61c000)
/lib64/ld-linux-x86-64.so.2 (0x00007fbc2dbe4000)

I checked if libyajl.so.2  exists at all. It sits in /usr/local/lib. The immediate reason pop into my head is /usr/local/lib is not included in LD_LIBRARY_PATH. And that's the issue.

Solved :)

No comments:

Post a Comment