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 directory /home/apps/gcc-8.2.0-install. I've also updated paths in my .bash_profile to PATH=/home/apps/gcc-8.2.0-install/bin:$PATH:$HOME/bin and LD_LIBRARY_PATH=/home/apps/gcc-8.2.0-install/lib64:$LD_LIBRARY_PATH:. When I check the version of gfortran, it says 8.2.0, but it seems that the shared library is not updated. When typing ldconfig -p | grep gfortran the outcome is libgfortran.so.3 (libc6,x86-64) => /lib64/libgfortran.so.3, while it should be libgfortran.so.5. I compiled a binary with GCC 8.2.0 , however it's missing a shared library saying that:
error while loading shared libraries: libgfortran.so.5: cannot open shared object file: No such file or directory
I guess I need to switch from default libgfortran.so.3 to libgfortran.so.5. Any ideas on how to work around this problem?