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

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

On Debian possible default full paths are:

/usr/bin/pnmmargin - from package: netpbm

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