moovweb / gvm

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

Raspberry Pi installation failed,No arm version installed #372

Open OCDpunk opened 3 years ago

OCDpunk commented 3 years ago

OS:Raspberry Pi OS release:5.10.17-v7l+ machine:rmv7l

I executed gvm install go1.4 -B and then executed gvm install go1.5, an error was reported: cannot execute binary file: Exec format error

I guess version 1.4 is installed into the wrong version, not the arm version, what should I do?

luisfelipe3d commented 3 years ago

Any update?

luisfelipe3d commented 3 years ago

The same problem here!

golang@mini:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:    10
Codename:   buster
golang@mini:~ $ gvm version
Go Version Manager v1.0.22 installed at /home/golang/.gvm
golang@mini:~ $ gvm install go1.4 -B
Installing go1.4 from binary source
golang@mini:~ $ gvm install go1.5
Downloading Go source...
Installing go1.5...
 * Compiling...
/home/golang/.gvm/scripts/install: line 84: /home/golang/.gvm/gos/go1.16.6/bin/go: unable to execute binary file: Error in exec format
ERROR: Failed to compile. Check the logs at /home/golang/.gvm/logs/go-go1.5-compile.log
ERROR: Failed to use installed version
golang@mini:~ $ cat /home/golang/.gvm/logs/go-go1.5-compile.log
##### Building Go bootstrap tool.
cmd/dist
ERROR: Cannot find /home/golang/go1.4/bin/go.
Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.
./make.bash: line 121: /home/golang/go1.4/bin/go: non-existent file or directory

My workaround: use the option -B.

golang@mini:~ $ gvm install go1.5 -B
Installing go1.5 from binary source

@OCDpunk

mcandre commented 3 years ago

On my Raspberry Pi model 4 B, I ran gvm install go1.17 -B and then gvm use go1.17 --default. But I get binary format errors :(

$ go version
zsh: exec format error: go

For now, I am working around this by manually installing Go from the arvmv6l stable release, per https://www.jeremymorgan.com/tutorials/raspberry-pi/install-go-raspberry-pi/

This would not work well in terms of rapidly switching between Go versions, without some sort of chroot setup. Would ultimately love to see gvm patched to download the appropriate release media for Raspberry Pi CPU's.