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

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

On Debian possible default full paths are:

/usr/bin/ppmdim - from package: netpbm

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