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

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

On Debian possible default full paths are:

/usr/lib/x86_64-linux-gnu/qt4/bin/moc - from package: libqt4-dev-bin
/usr/share/qt4/bin/moc - from package: libqt4-dev-bin
/usr/lib/x86_64-linux-gnu/qt5/bin/moc - from package: qtbase5-dev-tools
/usr/bin/moc - from package: qtchooser

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