gvm icon indicating copy to clipboard operation
gvm copied to clipboard

MacOS zsh (at least) install fail related to missing default

Open bentito opened this issue 2 years ago • 4 comments

MacOS: 14.0 GVM Verson: 1.0.22 shell: zsh

I may need some help figuring out what went wrong, because although I think I fixed my install with a workaround, I'm not sure what broke or why doing what I did fixed it:

After running the install script, the inserted command in my .zshrc' was causing this error all the time: ERROR: Invalid or corrupt Go version`

And I think I correctly traced the root cause to this being missing:

$ . "$GVM_ROOT/environments/default"
.: no such file or directory: /Users/bentito/.gvm/environments/default

So I did this from .gvm/environments:

$ ln -s go1.21.2 default

and that seems to have fixed the erroring. Though I had to remove that symlink and run through a few iterations of gvm use goX.Y --default to properly create $GVM_ROOT/environments/default in order to have the default functionality work.

probably unrelated: I installed GVM by installing binary version of go1.18, then normal install of go1.21.2 and I rm'ed and reinstalled via the installer script a few times.

If someone can explain this better such that a fix to the installer can be proposed I'd be happy to make a PR

bentito avatar Oct 10 '23 19:10 bentito

Having the same error: "ERROR: Invalid or corrupt Go version", with the latest master.

dannywillems avatar Oct 16 '23 18:10 dannywillems

Using gvm use [VERSION] --default fixes the issue.

dannywillems avatar Oct 16 '23 18:10 dannywillems

@bentito @dannywillems kindly try this out. I am using this goenv: https://github.com/ankitcharolia/goenv.

ankitcharolia avatar Oct 24 '23 05:10 ankitcharolia

Using gvm use [VERSION] --default fixes the issue.

That works for me, thanks, dude!

ibnumardini avatar Nov 08 '23 12:11 ibnumardini