在 http://gfortran.meteodat.ch/download/x86_64/nightlies/gcc-trunk.tar.xz 下载 gfortran
wget http://gfortran.meteodat.ch/download/x86_64/nightlies/gcc-trunk.tar.xz
xz -d gcc-trunk.tar.xz
tar -zxvf gcc-trunk.tar
把gcc-trunk文件移动到opt下面
mv gcc-trunk /opt
新建文件f.sh
if [ -z "$LD_LIBRARY_PATH" ] ; then
export LD_LIBRARY_PATH="/opt/gcc-trunk/lib64"
else
export LD_LIBRARY_PATH="/opt/gcc-trunk/lib64:$LD_LIBRARY_PATH"
fi
export PATH=/opt/gcc-trunk/bin:$PATH
source f.sh
测试版本
gfortran --version