rpmdev-setuptree: 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

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/bin/rpmdev-setuptree - from package: rpmdevtools

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