title: Program does not find so library, even though ldconfig knows about it
body: <p>The path to libidl.so.7.1 is in ld.so.conf, and the library is in the cache as well:</p>
  
  <pre><code>$ /sbin/ldconfig -p | grep libidl.so.7.1
      libidl.so.7.1 (libc6) =&gt; /opt/itt/idl71/bin/bin.linux.x86/libidl.so.7.1
  </code></pre>
  
  <p>However, for some reason it is not found by ldd:</p>
  
  <pre><code>$ ldd _pyIDLmodule.so | grep libidl.so.7.1
      libidl.so.7.1 =&gt; not found
  </code></pre>
  
  <p>Yet if I explicitly add the path to LD_LIBRARY_PATH, it works:</p>
  
  <pre><code>$ export LD_LIBRARY_PATH=/opt/itt/idl71/bin/bin.linux.x86_64/
  $ ldd _pyIDLmodule.so | grep libidl.so.7.1
  libidl.so.7.1 =&gt; /opt/itt/idl71/bin/bin.linux.x86_64/libidl.so.7.1 (0x00002b7428ee7000)
  </code></pre>
  
  <p>What am I doing wrong? Why isn't ldd finding the library?</p>