我使用
安装了gcc-gfortranyum install gcc-gfortran
但是当我编译一个简单的程序时。 gfortran给出了以下错误消息。
[xchen@localhost develope]$ gfortran -m64 test.f90
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/libgfortran.so when searching for -lgfortran
/usr/bin/ld: cannot find /usr/lib64/libquadmath.so.0.0.0
collect2: error: ld returned 1 exit status
当我检查已安装的软件包时,
[xchen@localhost develope]$ yum list gcc*
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.lzu.edu.cn
* epel: mirrors.aliyun.com
* extras: mirror.lzu.edu.cn
* updates: mirror.lzu.edu.cn
Installed Packages
gcc.x86_64 4.8.5-16.el7 @base
gcc-c++.x86_64 4.8.5-16.el7 @base
gcc-c++-x86_64-linux-gnu.x86_64 4.8.5-16.el7.1 @epel
gcc-gfortran.x86_64 4.8.5-16.el7 @base
gcc-x86_64-linux-gnu.x86_64 4.8.5-16.el7.1 @epel
我检查了与gfortran对应的库
Installed Packages
compat-gcc-44-gfortran.x86_64 4.4.7-8.el7 @base
compat-libgfortran-41.x86_64 4.1.2-44.el7 @anaconda
gcc-gfortran.x86_64 4.8.5-16.el7 @base
libgfortran.i686 4.8.5-16.el7 @base
libgfortran.x86_64 4.8.5-16.el7 @anaconda
libgfortran-static.i686 4.8.5-16.el7 @base
libgfortran-static.x86_64 4.8.5-16.el7 @base
libgfortran4.x86_64 7.1.1-2.2.1.el7 @base