简体   繁体   中英

libgfortran.so.4 in Fedora 28

I'm running Fedora 28, and now R is throwing the error below. I'm now unable to update (or even load) certain packages.

libgfortran.so.4: cannot open shared object file: No such file or directory

I believe the problem is that Fedora now comes with a newer version of the FORTRAN compiler, which is required by these R packages.

In the following directory, I have a library libgfortran.so. I assume this is the file it's looking for but is most likely too up to date?
/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.so

'dnf info libgfortran' tells me I'm running version 8.1.1 of libgfortran (so GCC 8). Whereas I believe libgfortran.so.4 comes from GCC 7.

I tried 'dnf downgrade libgfortran', but it was just an earlier version of GCC 8.

To be honest, I'm completely lost with a way to solve this. I need R, but at the moment it's useless. Apart from waiting for the R package devs to update their Fortran compilers, is there another way I can fix this?

The answer, as Knud pointed out, is to install the older version of libgfortran alongside the newer one in Fedora.

Get libgfortran.so.4 → libgfortran4-7.2.1-1.1.1.el7.x86_64.rpm

Link here: mirror.centos.org/centos/7.5.1804/os/x86_64/Packages/…

Install : sudo dnf install ~/Downloads/libgfortran4-7.2.1-1.1.1.el7.x86_64.rpm or if it fails with dnf try sudo yum install ~/Downloads/libgfortran4-7.2.1-1.1.1.el7.x86_64.rpm

The link provided by marius is not working, kind of inactive active.

Fedora 32, CentOS 8

Install:

sudo dnf install https://rpmfind.net/linux/centos/7.8.2003/os/x86_64/Packages/libgfortran4-8.3.1-2.1.1.el7.x86_64.rpm

RPM resource libgfortran4 :

https://rpmfind.net/linux/rpm2html/search.php?query=libgfortran.so.4()(64bit)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM