我有一个软件应用程序,它需要在制作程序之前将GFortran更新到更新的版本。我更新了gcc,但GFortran没有更新。这是在科学Linux 7上。
$ gcc --version
gcc (GCC) 7.3.0
$ gfortran --version
GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)如何让GFortran更新?即使只是为了这个应用程序?我在用yum。
编辑:搜索gfortran包提供以下内容:
$ sudo yum search all gfortran Loaded plugins: langpacks ============================== Matched: gfortran =============================== gcc-gfortran.x86_64 : Fortran support compat-gcc-44-gfortran.x86_64 : Fortran support for compatibility compiler compat-libgfortran-41.i686 : Compatibility Fortran 95 runtime library version : 4.1.2 compat-libgfortran-41.x86_64 : Compatibility Fortran 95 runtime library version : 4.1.2 libgfortran.i686 : Fortran runtime libgfortran.x86_64 : Fortran runtime libgfortran-static.i686 : Static Fortran libraries libgfortran-static.x86_64 : Static Fortran libraries mingw32-gcc-gfortran.x86_64 : MinGW Windows cross-compiler for FORTRAN for the : win32 target mingw64-gcc-gfortran.x86_64 : MinGW Windows cross-compiler for FORTRAN for the : win64 target
当我试图安装gcc-gfortran.x86_64时,我得到
$ yum install gcc-gfortran.x86_64 Loaded plugins: langpacks Package gcc-gfortran-4.8.5-11.el7.x86_64 already installed and latest version Nothing to do
粘在旧版上了。
编辑2:好的。为了获得一些更新的内容,我尝试安装devtoolset-7。它没有出现在yum search中,但是在科学Linux中获得包的方法是:
yum install yum-conf-repos yum install yum-conf-softwarecollections
现在,devtoolset-7出现在yum search中,但是我在尝试安装时得到了这个输出:
$ sudo yum install devtoolset-7 ... --> Finished Dependency Resolution Error: Package: devtoolset-7-gcc-gfortran-7.2.1-1.el7.sc1.x86_64 (softwarecollections) Requires: libgfortran4 >= 7.1.1-2 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
但,
$ sudo yum search libgfortran4 Loaded plugins: langpacks Warning: No matches found for: libgfortran4 No matches found
发布于 2018-02-23 20:32:47
如果安装的包管理器是yum (我在您的问题标签中注意到了它),您可以使用以下方法将GNU更新为可用的最新版本:
$ yum update gcc-gfortran发布于 2018-02-28 18:01:46
请根据需要编辑。谢谢Knud Larson的参考回购包。
为了让我的to SL7版本甚至可以看到最新版本的GFortran下载,我尝试安装devtoolset-7。为了访问devtoolset-7,我需要使用以下SL7命令
# yum install yum-conf-repos
# yum install yum-conf-softwarecollections
然后devtoolset-7可以安装。但是,当试图安装软件包时,libgfortran4不可用。为了安装所有的东西,我从CentOS下载了Knud Larson和libgfortran建议的回购包,并安装了libgfortran4。
# yum install ./libgfortran4-7.1.1-2.2.1.el7.x86_64.rpm
然后安装devtoolset-7
# yum install devtoolset-7-gcc-gfortran.x86_64
现在起作用了。谢谢大家。
https://unix.stackexchange.com/questions/426161
复制相似问题