needs-restarting: 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/bin/needs-restarting - from package: yum-utils

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