How to install libgfortran.so.4 on ubuntu 16.06

Beni Bogosel picture Beni Bogosel · Oct 1, 2017 · Viewed 17.5k times · Source

An app I use just updated and it no longer runs on my system. When I try to run the application I get the error: error while loading shared libraries: libgfortran.so.4: cannot open shared object file: No such file or directory

I looked on my system and only libgfortran.so.3 is available. Do you know what should I do to have the next version also? Which package should I install? (my system is ubuntu 16.04)

Answer

Vladimir F picture Vladimir F · Oct 1, 2017

This is an inverse problem to R v3.4.0-2 unable to find libgfortran.so.3 on Arch

So you must install GCC 7 including the Fortran part, that includes libgfortran 4.

There are answers describing how to do that at other StackExchange sites: