# Installing FreeFem++ on lubuntu 20.04

**URL:** <https://community.freefem.org/t/installing-freefem-on-lubuntu-20-04/2142>\
**Category:** FreeFEM installation\
**Created:** [November 24, 2022, 4:50pm UTC](https://community.freefem.org/t/installing-freefem-on-lubuntu-20-04/2142 "2022-11-24T16:50:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![barreraabc](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@barreraabc](https://community.freefem.org/u/barreraabc)\
**Post date:** [November 24, 2022, 4:50pm UTC](https://community.freefem.org/t/installing-freefem-on-lubuntu-20-04/2142/1 "2022-11-24T16:50:34Z")

</div>

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

```auto
1 sudo apt-get install libgsl-dev libhdf5-dev
2 liblapack-dev libopenmpi-dev freeglut3-dev

```

```auto
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

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [November 25, 2022, 1:52pm UTC](https://community.freefem.org/t/installing-freefem-on-lubuntu-20-04/2142/2 "2022-11-25T13:52:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![barreraabc](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@barreraabc](https://community.freefem.org/u/barreraabc)\
**Post date:** [November 25, 2022, 3:14pm UTC](https://community.freefem.org/t/installing-freefem-on-lubuntu-20-04/2142/3 "2022-11-25T15:14:26Z")

</div>

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:

```auto
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

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

```

And I think fortran was installed normally with

```auto
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.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [November 25, 2022, 3:28pm UTC](https://community.freefem.org/t/installing-freefem-on-lubuntu-20-04/2142/4 "2022-11-25T15:28:28Z")

</div>

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