Last active
June 1, 2021 21:34
-
-
Save ndaidong/4c0e9fbae8d3729510b1c04eb42d2a80 to your computer and use it in GitHub Desktop.
Install Go on Endeavour, Debian, Fedora
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export GO_VERSION=1.16.3 | |
export GO_DOWNLOAD_URL=https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz | |
export GOROOT=/opt/go | |
export GOPATH=$GOROOT/packages | |
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin | |
sudo mkdir $GOROOT | |
sudo chown -R ${USER} $GOROOT | |
if [ ! -f "go$GO_VERSION.linux-amd64.tar.gz" ]; then | |
wget "$GO_DOWNLOAD_URL" | |
fi | |
tar -zxvf go$GO_VERSION.linux-amd64.tar.gz | |
if [ -d "$GOROOT" ]; then | |
rm -rf ${GOROOT} | |
fi | |
mv go ${GOROOT} | |
echo "Installed Go v$GO_VERSION" | |
go version | |
# go get github.com/jesseduffield/lazydocker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you, just fixed and change to latest version 1.11.2