ninja: 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/ninja - from package: ninja-build
/usr/sbin/ninja - from package: ninja

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