groovy: 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 Debian possible default full paths are:

/usr/share/groovy2/bin/groovy - from package: groovy2
/usr/share/groovy/bin/groovy - from package: groovy

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