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

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

On Debian possible default full paths are:

/usr/lib/gmt/bin/mgd77magref - from package: GMT

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