Installing FreeFem++ on lubuntu 20.04

After installing FreeFem++ following the installation guide steps of “ubuntu installation”:

1 sudo apt-get install libgsl-dev libhdf5-dev
2             liblapack-dev libopenmpi-dev freeglut3-dev
1 dpkg -i FreeFEM_VERSION_Ubuntu_withPETSc_amd64.deb

When I type FreeFem++ or try to compile a .edp with it on the console, I get this error:

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

I have tried to follow some solutions but they seem to be obsolete as they need to install gfortran-7, and I didn’t get to install it from the existing repositories. Is this the only solution and I should go on looking for newer repositories? Any help would be great. Thank you

You should consider compiling the package from source to bypass the error.

Finally, my teacher fixed the error. I can´t describe the whole process, but first of all, he discovered that FreeFem and gfortran were having issues, so he uninstalled both of them. After that he used comands similar to these:

1 sudo apt-cache FreeFem++
2 sudo apt-cache gfortran

and he installed FreeFem from the result of the first comand, it was something like

sudo apt-get install freefem-doc freefem++ freefem++-doc libfreefem...

And I think fortran was installed normally with

sudo apt-get install gfortran

And the problem was solved.
If someone can review what I said and think that something is not right, they will be welcome.

It’s a bad idea to use apt-get install freefem++, as it installs a very old version of FreeFEM.