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

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

On Debian possible default full paths are:

/usr/bin/MagneticField - from package: geographiclib-tools

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