locate: 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/locate - from package: mlocate

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