rpcgen: 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/rpcgen - from package: glibc-common

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

On Debian possible default full paths are:

/usr/bin/rpcgen - from package: libc-dev-bin

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