Installing Groovy with GVM

1.9k views Asked by At

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
1

There are 1 answers

0
Emmanuel Rosa On

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.