r.topidx: 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/lib64/grass-6.4.4/bin/r.topidx - from package: grass

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

On Debian possible default full paths are:

/usr/lib/grass64/bin/r.topidx - from package: grass-core

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