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

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

On Debian possible default full paths are:

/usr/bin/mg - from package: mg

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