corosync-keygen: 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/sbin/corosync-keygen - from package: corosync

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

On Debian possible default full paths are:

/usr/sbin/corosync-keygen - from package: corosync
/usr/lib/debug/usr/sbin/corosync-keygen - from package: corosync-dbg

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