title: Why libgfortran.so.5 is not located after upgrade to the newest gcc?
body: <p>I'm running Centos 7 with default GNU Fortran (GCC) 4.8.5. Recently, I've installed GCC 8.2.0 in the non-standard <code>directory /home/apps/gcc-8.2.0-install</code>. </p>
  
  <p><img src="https://i.stack.imgur.com/jjTtI.jpg" alt="enter image description here"></p>
  
  <p>I've also updated paths in my <code>.bash_profile</code> to<br>
  <code>PATH=/home/apps/gcc-8.2.0-install/bin:$PATH:$HOME/bin</code> and<br>
  <code>LD_LIBRARY_PATH=/home/apps/gcc-8.2.0-install/lib64:$LD_LIBRARY_PATH:</code>.  </p>
  
  <p>When I check the version of <code>gfortran</code>, it says 8.2.0, but it seems that the shared library is not updated. When typing <code>ldconfig -p | grep gfortran</code> the outcome is <code>libgfortran.so.3 (libc6,x86-64) =&gt; /lib64/libgfortran.so.3</code>, while it should be <code>libgfortran.so.5</code>. I compiled a binary with GCC 8.2.0 , however it's missing a shared library saying that:</p>
  
  <blockquote>
    <p>error while loading shared libraries: libgfortran.so.5: cannot open<br>
    shared object file: No such file or directory</p>
  </blockquote>
  
  <p>I guess I need to switch from default libgfortran.so.3 to libgfortran.so.5. Any ideas on how to work around this problem?     </p>