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

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