【问题标题】:How to install libgfortran.so.4 on ubuntu 16.06如何在 ubuntu 16.06 上安装 libgfortran.so.4
【发布时间】:2023-04-09 22:29:02
【问题描述】:

我使用的一个应用程序刚刚更新,它不再在我的系统上运行。当我尝试运行应用程序时出现错误:error while loading shared libraries: libgfortran.so.4: cannot open shared object file: No such file or directory

我查看了我的系统,只有 libgfortran.so.3 可用。你知道我应该怎么做才能拥有下一个版本吗?我应该安装哪个软件包? (我的系统是ubuntu 16.04)

【问题讨论】:

  • Ubuntu 升级到 20.04 后出现同样的问题。太烦人了。

标签: ubuntu fortran ubuntu-16.04 gfortran


【解决方案1】:

这是R v3.4.0-2 unable to find libgfortran.so.3 on Arch的逆问题

因此,您必须安装 GCC 7,包括 Fortran 部分,其中包括 libgfortran 4。

在其他 StackExchange 网站上有描述如何做到这一点的答案:

【讨论】:

  • 感谢您的回答。我安装了 gcc-7 和 gfortran-7,现在错误消失了。
【解决方案2】:

您应该执行以下操作来解决问题

sudo add-apt-repository ppa:jonathonf/gcc-7.1

sudo apt-get update

sudo apt-get install gcc-7 g++-7
sudo apt-get install gfortran-7

【讨论】:

    猜你喜欢
    • 2020-11-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-29
    相关资源
    最近更新 更多