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

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

On Debian possible default full paths are:

/usr/bin/pnmindex - from package: netpbm

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