pgmmedian: 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/pgmmedian - from package: netpbm-progs

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