How to install Groovy in Fedora 32

Hello, I was looking to install Groovy in my Toolbox container to be able to test some small scripts I need to write.

Groovy — Fedora Developer Portal makes it look like it’s just a matter of dnf install groovy, but:

bkhl@toolbox:~$ sudo dnf install groovy
sudo: setrlimit(RLIMIT_CORE): Operation not permitted
Last metadata expiration check: 0:00:28 ago on Wed Jun 17 10:43:35 2020.
No match for argument: groovy
Error: Unable to find a match: groovy

This is in a clean Fedora 32 toolbox.

Some googling pointed to that I need to enable the “modular” repos, but those are as far as I can tell enabled already.

Any ideas?

For JVM programming, including Groovy, I usually use For Jdk I use the AdoptOpenJDK because the Openjdk from the fedora repo has issues with some of the jni stuff I was playing with.

I was going to try sdkman but I get this when I try to install it in toolbox…

⬢[mike@toolbox ~] curl -s “” | bash
bash: $: command not found

curl and bash are installed so what gives?

Nevermind, I found I needed to install groovy first as in the first post. It all worked fine for me. Thanks.

1 Like

Command not found is really odd here. I’ll try it later and see what happens for me.

[edit] It “just works” for me.

Yeah, command not found error message was not very helpful. I believe the install script from https://get/ must have some dependency that I did not have installed until I did the dnf install of groovy, which brought in many new packages including a jdk. Not sure what the dependency was and the sdkman install page did not give any info on other dependencies. I think the install script mostly just works on many distros because of the default installed packages, but a toolbox container may not have the right dependencies because it is meant to be light weight.

1 Like

Interesting, I created a new F32 toolbox container and I get the same error as @bkhl had. I did not get this when I installed groovy in my F31 toolbox container.

⬢[mike@toolbox ~]$ sudo dnf install groovy
sudo: setrlimit(RLIMIT_CORE): Operation not permitted
Fedora Modular 32 - x86_64 3.3 MB/s | 4.9 MB 00:01
Fedora Modular 32 - x86_64 - Updates 2.3 MB/s | 3.5 MB 00:01
Fedora Modular 32 - x86_64 - Test Updates 380 kB/s | 332 kB 00:00
Fedora 32 - x86_64 - Test Updates 4.1 MB/s | 16 MB 00:04
Fedora 32 - x86_64 - Updates 1.7 MB/s | 16 MB 00:09
Fedora 32 - x86_64 6.2 MB/s | 70 MB 00:11
No match for argument: groovy
Error: Unable to find a match: groovy

I think we are hitting this bug…

I usually just ignore that message.

It could be that Groovy was not built for Fedora 32 and so the package does not exist, whereas it did on 31. isn’t loading for me so I cannot even check :sweat_smile:

Actually dnf search groovy returns no results even after dnf upgrade and modular repos enabled. It did find it in my F31 toolbox so it must have been removed in F32 repos. I found that using the sdkman will install groovy, so that works for me. BTW, the error below was only on a fresh new toolbox. Running dnf upgrade fixes the sudo bug I mentioned before.

sudo: setrlimit(RLIMIT_CORE): Operation not permitted

It has not been built for anything other than 31.

Though, I would recommend using Groovy from sdkman anyway because you can use 3+ or other more recent versions of 2.x.

groovy (and especially gradle) have been removed from fedora 32 and later, because we’re unable to build and / or update them to newer versions due to questionable upstream decisions (requiring internet access for package builds and always needing exact versions of dependencies).

So dnf install groovy will not work anymore, and you’ll need another method of installing it. Sorry for the inconvenience :frowning:

sdkman works really well if you’re not using and IDE with tools built in. NetBeans has out of the box functionality for Gradle and you can pull in groovy with that. But if you want to just use Groovy standalone then sdkman really does the job fine.