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

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

On Debian possible default full paths are:

/usr/bin/rawtopgm - from package: netpbm

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