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

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

On Debian possible default full paths are:

/usr/bin/createuser - from package: postgresql-client-common
/usr/lib/postgresql/9.4/bin/createuser - from package: postgresql-client-9.4

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