title: how can i solve ldconfig create link with version number
body: <p>Suppose I have <code>/a/lib/dir</code> that has files </p>
  
  <pre><code>-rwxrwxr-x libboost_signals.so
  -rwxrwxr-x libboost_signals.so.1.55.0
  </code></pre>
  
  <p>And I create a file: <code>/etc/ld.so.conf.d/testlib.conf</code> with content</p>
  
  <pre><code>/a/lib/dir
  </code></pre>
  
  <p>And run </p>
  
  <pre><code>sudo ldconfig
  sudo ldconfig -v | head
  
  libboost_signals.so.1.55.0 -&gt; libboost_signals.so.1.55.0
  </code></pre>
  
  <p>Since ldconfig create a link <code>libboost_signals.so.1.55.0</code> not <code>libboost_signals.so</code>,</p>
  
  <p>I can't use <code>-lboost_signals</code> when use g++ to compile the source code.</p>
  
  <p>But <code>-L/a/lib/dir/ -lboost_signals</code> is ok.</p>
  
  <hr>
  
  <p>Edit the .bashrc file as:</p>
  
  <pre><code>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/a/lib/dir
  </code></pre>
  
  <p>then </p>
  
  <pre><code>source .bashrc
  </code></pre>
  
  <p>will be the same result.</p>
  
  <p>So what is the correct way to add system LD_LIBRARY_PATH? </p>