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

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

On Debian possible default full paths are:

/usr/bin/pbmtopgm - from package: netpbm

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