gcc-4.2: 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 Debian possible default full paths are:

/usr/bin/gcc-4.2 - from package: hardening-wrapper

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