moovweb / gvm

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

Fresh installation failure for `gvm install go1.13.7` #334

Closed chenrui333 closed 1 year ago

chenrui333 commented 4 years ago

With doing fresh installation, I have run into this issue:

$ gvm install go1.13.7
Installing go1.13.7...
 * Compiling...
/Users/rchen/.gvm/scripts/install: line 84: go: command not found
ERROR: Failed to compile. Check the logs at /Users/rchen/.gvm/logs/go-go1.13.7-compile.log
ERROR: Failed to use installed version

Commands I have run:

Solution:

$ gvm install go1.13.7
Installing go1.13.7...
 * Compiling...
go1.13.7 successfully installed!
BenKnigge commented 4 years ago

I should probably check for go and install the latest binary if not present..

yorci commented 4 years ago

Another solution for that problem:

gvm install [tag] -B

That because when you run install command without -B option, it downloads go source and try to compile but it cant compile if go is not installed. ( atleast i think bcuz of that :) )

With -B option, it downloads compiled binary go.

ctopinka commented 4 years ago

gvm install [tag] -B

Installs now but still get error on Catalina 10.15.3 with zsh

% gvm install go1.4 -B
Installing go1.4 from binary source

% gvm list

gvm gos (installed)

go1.4

% gvm use go1.4 Now using version go1.4

% go version failed MSpanList_Insert 0x12bc000 0xcb77bb2575aa 0x0 fatal error: MSpanList_Insert

runtime stack: runtime.throw(0x7ffa6b) /usr/local/go/src/runtime/panic.go:491 +0xad fp=0x7ffeefbff340 sp=0x7ffeefbff310 runtime.MSpanList_Insert(0x82af28, 0x12bc000) /usr/local/go/src/runtime/mheap.c:692 +0x8f fp=0x7ffeefbff368 sp=0x7ffeefbff340 MHeap_FreeSpanLocked(0x827b20, 0x12bc000, 0x100) /usr/local/go/src/runtime/mheap.c:583 +0x163 fp=0x7ffeefbff3a8 sp=0x7ffeefbff368 MHeap_Grow(0x827b20, 0x8, 0x0) /usr/local/go/src/runtime/mheap.c:420 +0x1a8 fp=0x7ffeefbff3e8 sp=0x7ffeefbff3a8 MHeap_AllocSpanLocked(0x827b20, 0x1, 0x0) /usr/local/go/src/runtime/mheap.c:298 +0x365 fp=0x7ffeefbff428 sp=0x7ffeefbff3e8 mheap_alloc(0x827b20, 0x1, 0x7f0000000012, 0x7fff6e38d656) /usr/local/go/src/runtime/mheap.c:190 +0x121 fp=0x7ffeefbff450 sp=0x7ffeefbff428 runtime.MHeap_Alloc(0x827b20, 0x1, 0x10000000012, 0x977a9) /usr/local/go/src/runtime/mheap.c:240 +0x66 fp=0x7ffeefbff488 sp=0x7ffeefbff450 MCentral_Grow(0x82f898, 0x122d000) /usr/local/go/src/runtime/mcentral.c:197 +0x8b fp=0x7ffeefbff4f0 sp=0x7ffeefbff488 runtime.MCentral_CacheSpan(0x82f898, 0x7ffeefbff560) /usr/local/go/src/runtime/mcentral.c:85 +0x167 fp=0x7ffeefbff528 sp=0x7ffeefbff4f0 runtime.MCache_Refill(0x12b8000, 0x12, 0x7ffeefbff580) /usr/local/go/src/runtime/mcache.c:90 +0xa0 fp=0x7ffeefbff550 sp=0x7ffeefbff528 runtime.mcacheRefill_m() /usr/local/go/src/runtime/malloc.c:368 +0x57 fp=0x7ffeefbff570 sp=0x7ffeefbff550 runtime.onM(0x6a2870) /usr/local/go/src/runtime/asm_amd64.s:273 +0x9a fp=0x7ffeefbff578 sp=0x7ffeefbff570 runtime.mallocgc(0x120, 0x590240, 0x0, 0x0) /usr/local/go/src/runtime/malloc.go:178 +0x85b fp=0x7ffeefbff628 sp=0x7ffeefbff578 runtime.newobject(0x590240, 0x12b8000) /usr/local/go/src/runtime/malloc.go:353 +0x49 fp=0x7ffeefbff650 sp=0x7ffeefbff628 runtime.newG(0xb17fa) /usr/local/go/src/runtime/proc.go:233 +0x2a fp=0x7ffeefbff668 sp=0x7ffeefbff650 allocg(0x817ac0) /usr/local/go/src/runtime/proc.c:925 +0x1f fp=0x7ffeefbff678 sp=0x7ffeefbff668 runtime.malg(0x8000, 0x817e40) /usr/local/go/src/runtime/proc.c:2106 +0x1f fp=0x7ffeefbff6a8 sp=0x7ffeefbff678 runtime.mpreinit(0x818680) /usr/local/go/src/runtime/os_darwin.c:137 +0x27 fp=0x7ffeefbff6c0 sp=0x7ffeefbff6a8 mcommoninit(0x818680) /usr/local/go/src/runtime/proc.c:201 +0xc9 fp=0x7ffeefbff6e8 sp=0x7ffeefbff6c0 runtime.schedinit() /usr/local/go/src/runtime/proc.c:138 +0x6e fp=0x7ffeefbff710 sp=0x7ffeefbff6e8 runtime.rt0_go(0x7ffeefbff748, 0x2, 0x7ffeefbff748, 0x0, 0x0, 0x2, 0x7ffeefbff8f0, 0x7ffeefbff8f3, 0x0, 0x7ffeefbff8fb, ...) /usr/local/go/src/runtime/asm_amd64.s:95 +0x116 fp=0x7ffeefbff718 sp=0x7ffeefbff710

ctopinka commented 4 years ago

And then

% gvm implode gvm_implode:read:1: -p: no coprocess

Action cancelled

jdcookie commented 4 years ago

@ctopinka I had the same issue.

Tried simply skipping the instructions in the readme to download 1.4 first and started with this. gvm install go1.14.1 -B

then

gvm use go1.14.1

and it worked.

Macbook-Pro:~ $ which go /Users/J/.gvm/gos/go1.14.1/bin/go