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

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

On Debian possible default full paths are:

/usr/bin/pnmfile - from package: netpbm

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