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

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