title: Failure to load existing library
body: <p>I'm trying to explain a complex problem, so bear with me.</p>
  
  <p>Say I have these files</p>
  
  <pre><code>/path/build/
  /path/build/liba.so
  /path/build/liba.so.3 -&gt; liba.so
  /path/build/libtest.so
  </code></pre>
  
  <p>I even have set <code>PATH=/path/build:...</code> (where <code>...</code> is my normal <code>$PATH</code>).</p>
  
  <p>At some point <code>libtest.so</code> will load <code>liba.so.3</code> at runtime.</p>
  
  <p>However, <code>liba.so.3</code> doesn't seem to exist when running code that (successfully) loads <code>libtest.so</code>, and when I ask <code>ldd</code> for help, I get this:</p>
  
  <pre><code>$ ldd /path/build/libtest.so
  linux-vdso.so.1 =&gt;  (0x00007fff24fff000)
  liba.so.3 =&gt; not found
  libstdc++.so.6 =&gt; /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8fea222000)
  libm.so.6 =&gt; /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8fe9f9e000)
  libgcc_s.so.1 =&gt; /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8fe9d88000)
  libpthread.so.0 =&gt; /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8fe9b6a000)
  libc.so.6 =&gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8fe97c9000)
  /lib64/ld-linux-x86-64.so.2 (0x00007f8fea767000)
  </code></pre>
  
  <p>(note the second output line)</p>
  
  <p>How can I figure out what's going wrong? The library is clearly there, but the loader claims it's not.</p>