title: Runtime library version different from build version
body: <p>So I build a simple C program with <code>-libconfig</code> and <code>-L /usr/lib64/</code></p>
  
  <p>something like:
  <code>clang *.c -o app -L /usr/lib64/ -lconfig</code></p>
  
  <p>I'm using centos6 and got the library here <code>/usr/lib64/libconfig.so.8</code></p>
  
  <p>It builds all fine but when I run it I get this:
  <code>error while loading shared libraries: libconfig.so.9: cannot open shared object file: No such file or directory</code></p>
  
  <p>Obviously it looks for a greater version of the library but I can't explain why. Just installing/upgrading libconfig.so.9 is also not an option.</p>
  
  <p><strong>Update</strong></p>
  
  <p>I took the advice from the comments and removed the unnecessary <code>-L</code> parameter but that didn't change anything. I still get the same error.<br>
    <code>$ ll -s /usr/lib64/libconf*
      0 lrwxrwxrwx. 1 root root    18 Dec 15  2015 /usr/lib64/libconfig.so -&gt; libconfig.so.8.0.0
      0 lrwxrwxrwx. 1 root root    20 Dec 15  2015 /usr/lib64/libconfig++.so -&gt; libconfig++.so.8.0.0
      0 lrwxrwxrwx. 1 root root    18 Dec 15  2015 /usr/lib64/libconfig.so.8 -&gt; libconfig.so.8.0.0
      0 lrwxrwxrwx. 1 root root    20 Dec 15  2015 /usr/lib64/libconfig++.so.8 -&gt; libconfig++.so.8.0.0
  44 -rwxr-xr-x. 1 root root 41960 Aug 19  2010 /usr/lib64/libconfig.so.8.0.0
  88 -rwxr-xr-x. 1 root root 87408 Aug 19  2010 /usr/lib64/libconfig++.so.8.0.0</code></p>
  
  <p><code>ldconfig -v | grep libconfig
      libconfig.so.8 -&gt; libconfig.so.8.0.0
      libconfig++.so.8 -&gt; libconfig++.so.8.0.0
  </code></p>
  
  <p>These lines look very ordinary and OK to me. Still no clue. </p>