g++-4.7: 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/g++-4.7 - from package: hardening-wrapper

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