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

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

On Debian possible default full paths are:

/usr/bin/pnmcomp - from package: netpbm

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