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

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