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

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

On Debian possible default full paths are:

/usr/bin/mag - from package: texlive-binaries

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