moc-qt5: 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/moc-qt5 - from package: qt5-qtbase-devel
/usr/lib64/qt5/bin/moc-qt5 - from package: qt5-qtbase-devel
/usr/lib/qt5/bin/moc-qt5 - from package: qt5-qtbase-devel

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