moovweb / gvm

Go Version Manager
http://github.com/moovweb/gvm
MIT License
10.33k stars 540 forks source link

You need go to install go? #323

Open Shardj opened 5 years ago

Shardj commented 5 years ago

Running gvm install go1.12.6 (or any version) gets me

Installing go1.12.6...
 * Compiling...
/home/{myname}/.gvm/scripts/install: line 84: go: command not found
ERROR: Failed to compile. Check the logs at /home/{myname}/.gvm/logs/go-go1.12.6-compile.log
ERROR: Failed to use installed version

The log gives me

Building Go cmd/dist using /home/{myname}/go1.4.
ERROR: Cannot find /home/{myname}/go1.4/bin/go.
Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.
tkshnwesper commented 5 years ago

You could install the binary rather than building from source:

gvm install go1.12.5 -B
haysclark commented 4 years ago

OSX users should see if these steps https://github.com/moovweb/gvm/issues/307#issuecomment-432909339 fix their Issues.

Likely this Issue can be Closed, as this issue is mentioned in the README. https://github.com/moovweb/gvm#a-note-on-compiling-go-15

BenKnigge commented 4 years ago

I'm going to be taking over as maintainer of this project and would like some feedback from the community. How would you feel about having binary install as the default and adding a -S flag to install from source?

SamZapata commented 4 years ago

Today I used gvm install go1.14.2 -B and this work well. Because I tried to use gvm install go1.14.2 but this was taking looong time and does not finished. I want to understand why. Thanks for all!

tkshnwesper commented 4 years ago

@SamZapata It takes a long time because it tries to build a binary using the Golang sourcecode.

On the other hand, -B downloads a pre-built binary.

besteffects commented 4 years ago

gvm install go1.12.5 -B does not work on Mac

besteffects commented 4 years ago

It worked finnaly, I had to deal with this error https://stackoverflow.com/questions/35009531/xcrun-error-active-developer-path-applications-xcode-app-contents-developer I used sudo xcode-select --reset

sychovoleh-nowsta commented 1 year ago

gvm install go1.12.5 -B does not work on Mac

There is solution that worked for me https://github.com/moovweb/gvm/issues/385#issuecomment-1030190550