pg_upgrade: 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/lib/postgresql/9.4/bin/pg_upgrade - from package: postgresql-9.4

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