libgfortran.so.4 在 Fedora 28 中

libgfortran.so.4 in Fedora 28

我是 运行 Fedora 28,现在 R 抛出了下面的错误。我现在无法更新(甚至加载)某些包。

libgfortran.so.4: 无法打开共享对象文件:没有那个文件或目录

我认为问题是 Fedora 现在带有更新版本的 FORTRAN 编译器,这些 R 包需要它。

在下面的目录中,我有一个库libgfortran.so。我假设这是它正在寻找的文件,但很可能是最新的?
/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.所以

'dnf info libgfortran' 告诉我我是 运行 libgfortran 的 8.1.1 版(所以是 GCC 8)。而我相信 libgfortran.so.4 来自 GCC 7。

我试过'dnf downgrade libgfortran',但它只是 GCC 8 的早期版本。

老实说,我完全不知道解决这个问题的方法。我需要R,但目前没用。除了等待 R 包开发人员更新他们的 Fortran 编译器之外,还有其他方法可以解决这个问题吗?

正如 Knud 指出的那样,答案是在 Fedora 中安装旧版本的 libgfortran 和新版本。

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

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

安装:sudo dnf install ~/Downloads/libgfortran4-7.2.1-1.1.1.el7.x86_64.rpm 或者如果 dnf 尝试失败 sudo yum install ~/Downloads/libgfortran4-7.2.1-1.1.1.el7.x86_64.rpm

marius 提供的 link 不工作,有点不活跃。

Fedora 32、CentOS 8

安装:

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 资源 libgfortran4:

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