title: ./a.out: error while loading shared libraries: libgsl.so.23: cannot open shared object file: No such file or directory
body: <p>After installing GNU Scientific Library (GSL)  from source code, I write a program to test if the library work.</p>
  
  <pre><code> $gcc -Wall -I ~/gsl/include -c example.c
   $gcc -L ~/gsl/lib example.o -lgsl -lgslcblas -lm
   $./a.out 
   ./a.out: error while loading shared libraries: libgsl.so.23: cannot open shared object file: No such file or directory
  </code></pre>
  
  <p>There is no problem in Compiling and linking procedure. <code>No such file or directory</code> but there is such directory.</p>
  
  <pre><code>  $ls -l ~/gsl/lib
  total 32920
  -rw-r--r-- 1 wm wm 19418210 8月  14 07:09 libgsl.a
  -rw-r--r-- 1 wm wm  1840642 8月  14 07:08 libgslcblas.a
  -rwxr-xr-x 1 wm wm      951 8月  14 07:08 libgslcblas.la
  lrwxrwxrwx 1 wm wm       20 8月  14 07:08 libgslcblas.so -&gt; libgslcblas.so.0.0.0
  lrwxrwxrwx 1 wm wm       20 8月  14 07:08 libgslcblas.so.0 -&gt; libgslcblas.so.0.0.0
  -rwxr-xr-x 1 wm wm  1100520 8月  14 07:08 libgslcblas.so.0.0.0
  -rwxr-xr-x 1 wm wm      920 8月  14 07:09 libgsl.la
  lrwxrwxrwx 1 wm wm       16 8月  14 07:09 libgsl.so -&gt; libgsl.so.23.0.0
  lrwxrwxrwx 1 wm wm       16 8月  14 07:09 libgsl.so.23 -&gt; libgsl.so.23.0.0
  -rwxr-xr-x 1 wm wm 11333224 8月  14 07:09 libgsl.so.23.0.0
  drwxrwxr-x 2 wm wm     4096 8月  14 07:09 pkgconfig
  </code></pre>