6

当我尝试运行此命令以使用 GVM 安装 Groovy 时,我收到以下错误消息:

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

为什么这不起作用?据我所知,我使用以下方法正确安装了 GVM:

$ curl -s get.gvmtool.net | bash

我在 Mac 上

这是我跑步时看到的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
4

1 回答 1

7

你的候选人名单不见了。您可能有一个名为$HOME/.gvm/var/candidates的空文件。尝试运行gvm flush Candidates,然后打开一个新终端,以便 gvm 初始化。这应该会迫使 gvm 下载候选文件。

于 2015-08-10T01:16:49.723 回答