Installing Groovy with GVM
Asked Answered
R

1

6

When I try to run this command to install Groovy using GVM I get this error message:

$gvm install groovy
Stop! groovy is not a valid candidate.

Why doesn't this work? As far as I know I installed GVM correctly using this:

$ curl -s get.gvmtool.net | bash

I am on a Mac

Here is what I see when I run gvm help:

$ gvm help

Usage: gvm <command> <candidate> [version]
       gvm offline <enable|disable>

   commands:
       install   or i    <candidate> [version]
       uninstall or rm   <candidate> <version>
       list      or ls   <candidate>
       use       or u    <candidate> [version]
       default   or d    <candidate> [version]
       current   or c    [candidate]
       outdated  or o    [candidate]
       version   or v
       broadcast or b
       help      or h
       offline           <enable|disable>
       selfupdate        [force]
       flush             <candidates|broadcast|archives|temp>

   candidate  :
   version    :  where optional, defaults to latest stable if not provided

eg: gvm install groovy
Riemann answered 19/6, 2015 at 17:24 Comment(8)
Working fine for me; you have a Java installed and functional? You opened a new window or ran the shell command, I assume, since you said you ran gvm help successfully?Martella
Yes, I have Java installed and functional. Yes, I tried both opening a new window and running the shell command. Here, I'll update with what I see when I run 'gvm help'Riemann
Any messages during gvm installation? Behind a proxy? Can you hit api.gvmtool.net, like api.gvmtool.net/candidates?Martella
Ah.. I don't remember. Could the problem have anything to do with having the Groovy plugin with IntelliJ 14? I wanted to run Groovy JUnit tests, but it said I had to select the Groovy SDK location, which is why I tried installing it. Am I doing this process wrong?Riemann
Yes, I can access those webpages.Riemann
I seriously doubt it's IntelliJ-related; gvm is its own tool, with its own directory ($HOME/.gvm), etc. I'd probably blow away that directory and try again as a sanity check.Martella
try to type gvm current and give us the output pleaseLawley
Just my 2 cents. I tried to reproduce it but could not. I have brew and bash updated to 4.3 but I tried also with old mac bash 3.2 and it worked. For some reason you have candidate list not populated. in gvm help you must have something like: candidate : asciidoctorj, crash, gaiden, glide, gradle, grails, griffon, groovy, groovyserv, jbake, jbossforge, lazybones, springboot, vertx version : where optional, defaults to latest stable if not provided ... but you have candidate: <EMPTY> You may try to delete .gvm folder and reinstall it ... if this helpArnst
T
7

Your list of candidates is missing. You may have an empty file named $HOME/.gvm/var/candidates. Try running gvm flush candidates and then open a new terminal so that gvm initializes. That should force gvm to download the candidates file.

Tyika answered 10/8, 2015 at 1:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.