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

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

On Debian possible default full paths are:

/usr/bin/pnmgamma - from package: netpbm

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