gcc: 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/gcc - from package: gcc
/usr/lib64/icecc/bin/gcc - from package: icecream
/usr/lib/icecc/bin/gcc - from package: icecream

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

On Debian possible default full paths are:

/usr/bin/gcc - from package: gcc
/usr/bin/gcc - from package: pentium-builder
/usr/lib/icecc/bin/gcc - from package: icecc

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