Commands: version - print the gvm version number get - gets the latest code (for debugging) use - select a go version to use (--default to set permanently) diff - view changes to Go root help - display this usage text implode - completely remove gvm install - install go versions uninstall - uninstall go versions cross - install go cross compilers linkthis - link this directory into GOPATH list - list installed go versions listall - list available versions alias - manage go version aliases pkgset - manage go packages sets pkgenv - edit the environment for a package set
安裝 golang
透過 gvm install go1.9.7 指定安裝版本,但是一直鬼打牆無法安裝:
1 2 3 4 5 6 7 8 9 10 11 12
~$ gvm install go1.9.7 Downloading Go source... Installing go1.9.7... * Compiling... ERROR: Failed to compile. Check the logs at /Users/rick/.gvm/logs/go-go1.9.7-compile.log ERROR: Failed to use installed version
~$ cat /Users/rick/.gvm/logs/go-go1.9.7-compile.log ##### Building Go bootstrap tool. cmd/dist ERROR: Cannot find /Users/rick/go1.4/bin/go. Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.