I'm trying to install Golang on my raspberry pi running ubuntu server 20.04LTS and am having a lot of trouble. I could probably use advice on how to make sure I undo and uninstall any changes I made while attempting to install go-lang via snap and apt-get.
I have successfully installed the package from tar.gz
found at go.dev
into the correct location /usr/local/
But no matter how many instructions I follow on exporting the path I always get this same error.
I have cleared out my path in order to prep for getting help
And I have extracted /go from the go.dev
tar.gz
file
Please I really could use some help with the appropriate installation procedure.
What is the correct method? snap
or apt-get
?
How are the variables actually supposed to be set?
How do I make sure I uninstall everything I did wrong and reinstall the right way ?
I have tried several times to compile it manually by unzipping from tar.gz but even when I try running ./go/bin/go
directly I still get the error -bash: ./go/bin/go: cannot execute binary file: Exec format error
two commands I ran troubleshooting that Im not sure how to undo.. or if i need to.
sudo update-alternatives --set go /usr/local/go/bin/go
sudo update-alternatives --install "/usr/bin/go" "go" "/usr/local/go/bin/go" 0