How to resolve 'error while loading shared libraries: libgfortran.so.4

738 Views Asked by At

I was getting this error:

error while loading shared libraries: libgfortran.so.4: cannot open shared object file: No such file or directory

To resolve this, I searched "libgfortran.so.4" on google and I come to this site " How to install libgfortran.so.4 on ubuntu 16.06 "

So as given in this site tried to run the commands on terminal: Command 1:

  sudo add-apt-repository ppa:jonathonf/gcc-7.1
ERROR: ppa 'jonathonf/gcc-7.1' not found (use --login if private)

Command 2:

sudo apt-get install gcc-7 g++-7
E: Package 'gcc-7' has no installation candidate
E: Package 'g++-7' has no installation candidate

Command 3:

 sudo apt-get install gfortran-7
E: Unable to locate package gfortran-7

Please help me to resolve this issue so that I can get rid of the error.

0

There are 0 best solutions below