Install Groovy on Rocky Linux
Rocky Linux gets Groovy from EPEL, the extra packages repository of the Red Hat family. This is the Rocky page of the install overview.
Enable EPEL
EPEL is one package, and dnf finds it in the base repository:
sudo dnf install -y epel-release
On a minimal install the command also needs dnf-plugins-core for config-manager; the command above is enough for the standard image.
Install Groovy and a JDK
The package is groovy, and it needs a JDK 17 or newer:
sudo dnf install -y java-21-openjdk-devel groovy
The -devel package brings javac; without it groovy runs and groovyc fails. EPEL builds the version of its own release cycle, so groovy --version may name an older release than 5.0.8.
Check the version
groovy --version prints the line, and readlink -f $(which groovy) shows which install answered when more than one is on the PATH. This container is Alpine and has no dnf, so the commands were not run here.
Related
- Install Groovy on macOS: the next system page.
- Install Groovy on Ubuntu: the distribution package of the Debian family.
Article author: Arthur Isaev