gtnameserv: 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/gtnameserv - from package: libgcj

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

On Debian possible default full paths are:

/usr/bin/gtnameserv - from package: gcj-jdk

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