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

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

On Debian possible default full paths are:

/usr/bin/pnmarith - from package: netpbm

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