finding ldd search path

How can I find the search path of ldd? Assume ldd returns

[mahmood@dhcppc2 bin]$ ldd /home/mahmood/amd64-linux/lib/scsi-bus.so
        linux-vdso.so.1 =>  (0x00007fffc27c7000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ffb13a25000)
        libstdc++.so.5 => not found
        libm.so.6 => /lib64/libm.so.6 (0x00007ffb137a0000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ffb13589000)
        libc.so.6 => /lib64/libc.so.6 (0x00007ffb131f6000)
        /lib64/ld-linux-x86-64.so.2 (0x00000037d6000000)

I want to know what is the default location for ldd? I mean /lib64 or /usr/lib or /usr/lib64 ....?


Solution 1:

The ldconfig command will show these paths for you...

ldconfig -v | grep -v ^$'\t'

The paths are set in /etc/ld.so.conf and /etc/ld.so.conf.d.

Solution 2:

Usually this is set on /etc/ld.so.conf