Search code examples
javaubuntublasubuntu-20.04jblas

How can I install libgfortran3 in Ubuntu/Lubuntu 20.04?


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?


Solution

  • 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.