How can I install libgfortran3 in Ubuntu/Lubuntu 20.04?

9.1k Views Asked by At

I'm using jBlas and it require libgfortran3 and tell me to install it from:

sudo apt-get install libgfortran3

But I'm using Lubuntu 20.04, which use the same packages as Ubuntu 20.04. I can't find the package here https://packages.ubuntu.com/search?keywords=libgfortran3

So what should I do?

2

There are 2 best solutions below

2
MWiesner On BEST ANSWER

In short, libgfortran3 is no longer supported in Ubuntu 20.04. It depends on an older version of gcc which is no longer maintained in this version of the distribution.

As an alternative, you might want to try installing its successor package with:

sudo apt-get install libgfortran5

It will provide these files for your Ubuntu installation:

/usr/lib/x86_64-linux-gnu/libgfortran.so.5
/usr/lib/x86_64-linux-gnu/libgfortran.so.5.0.0
/usr/share/doc/libgfortran5

This way, you have an option of dynamically loading/linking against libgfortran at runtime.

Hope it helps.

0
Stupid Boy On

If you have to use libgfortran3, you can just copy a libgfortran.so.3 in /usr/lib/x86_64-linux-gnu/. It works for me.