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

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