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

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

On Debian possible default full paths are:

/usr/bin/createrepo - from package: createrepo

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