Ubuntu 加载共享库时出错:libgfortran.so.1:无法打开共享对象文件:没有这样的文件或目录

Ubuntu 加载共享库时出错:libgfortran.so.1:无法打开共享对象文件:没有这样的文件或目录,ubuntu,docker,gfortran,Ubuntu,Docker,Gfortran,我的任务是把程序放到docker环境中,我使用ubuntu容器。程序采用fortran语言编写。 当我运行程序时,我得到了这个错误 ./cscheck.out: error while loading shared libraries: libgfortran.so.1: cannot open shared object file: No such file or directory 我几乎已经阅读了所有的搜索页面。我尝试了ldconfig-v命令,但它不起作用。我了解到这个错误是因为缺少l

我的任务是把程序放到docker环境中,我使用ubuntu容器。程序采用fortran语言编写。 当我运行程序时,我得到了这个错误

./cscheck.out: error while loading shared libraries: libgfortran.so.1: cannot open shared object file: No such file or directory
我几乎已经阅读了所有的搜索页面。我尝试了ldconfig-v命令,但它不起作用。我了解到这个错误是因为缺少libgfortran.so.1,但是在ubuntu包搜索页面中,libgfortran的最低版本是3。所以我找不到版本1


你能给我一些线索吗,我需要继续尝试。

你从哪里得到这个程序的?如果您有源代码或者需要找到旧的libgfortran,请使用当前的gfortran重新构建它。它将出现在GCC的旧版本中。尝试安装GCC4.1或类似版本。这样的旧版本将不会出现在当前存储库中,您必须手动安装它。

在Ubuntu 18.04中,出现以下错误:

sander: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory
是通过跑步来修复的

sudo apt-get install libgfortran3:amd64
sudo apt-get install libgfortran1:amd64  
对于libgfortran1,通过运行

sudo apt-get install libgfortran3:amd64
sudo apt-get install libgfortran1:amd64  

此外,在amd64的位置上,我知道以下选项:i386、i586、i686、x86_64

这个程序是由同学们得到的,重建程序确实有效。如果你想的话,你也可以问一个关于如何修复程序的不同问题。它可能包含一些错误。