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

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

On Debian possible default full paths are:

/usr/bin/ppmhist - from package: netpbm

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