apg: 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/apg - from package: apg

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

On Debian possible default full paths are:

/usr/bin/apg - from package: apg

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