gfortran: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/gfortran - from package: gcc-gfortran

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/gfortran - from package: gfortran

You may install the required package with command apt-get install {package}
Error in other languages:
gfortran: bevel nie gevind nie
gfortran: comandă negăsită
gfortran: comando não encontrado
gfortran: commande introuvable
gfortran: command not found
gfortran: käsku ei ole
gfortran: không tìm thấy lệnh
gfortran: komanda nerasta
gfortran: Kommando nicht gefunden.
gfortran: kommandot finns inte
gfortran: komut yok
gfortran: nie znaleziono polecenia
gfortran: níor aimsíodh an t-ordú
gfortran: no se encontró la orden
gfortran: no s'ha trobat l'ordre
gfortran: opdracht niet gevonden
gfortran: parancs nem található
gfortran: perintah tidak ditemukan
gfortran: príkaz nenájdený
gfortran: příkaz nenalezen
gfortran: команда не найдена
gfortran: командата не е открита
gfortran: 命令找不到
gfortran: コマンドが見つかりません