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

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