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

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

On Debian possible default full paths are:

/usr/bin/luarocks - from package: luarocks

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