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

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