GVM Error Setting Default Groovy Version

118 Views Asked by At

I installed groovy with GVM:

gvm install groovy

But when I say yes to the set 2.4.6 as default version, I get this error:

rm: `/c/Users/<user_name>/.sdkman/candidates/groovy/current' is a directory
ln: `/c/Users/<user_name>/.sdkman/candidates/groovy/current': cannot overwrite direc
tory

Not sure why it's trying to rm the current folder but then create a symbolic link to it. Any ideas what I'm doing wrong?

2

There are 2 best solutions below

0
tim_yates On

current should be a symbolic link to the directory of your current version, not a directory itself

Looks like for some reason, it's currently a directory

Try moving current out of the way, and trying again

PS: gvm is now called sdkman and the command is sdk not gvm though gvm still currently works for historic compatibility

0
Jayan On

From the name it looks like you are on "MinGW" shell. sdkman cannot handle the softlinks in this environment.

Delete current directory and copy the version you want to use. This is not a groovy issue; affects all tools available under sdkman (such as lazybone, grails..)