which: 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/lib/node_modules/which/bin/which - from package: nodejs-which
/usr/bin/which - from package: which

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

On Debian possible default full paths are:

/usr/bin/which - from package: debianutils
/bin/which - from package: debianutils

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