-
-
Save tkc/b61f06af5ab53be6158b9754e159a91a to your computer and use it in GitHub Desktop.
Install Go 1.10 in Ubuntu 16+
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.10 | |
export GO_DOWNLOAD_URL=https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz | |
export GOPATH=/usr/local/lib/go | |
export GOROOT=/usr/local/go | |
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin | |
sudo mkdir ${GOPATH} | |
sudo chown ${USER} -R ${GOPATH} | |
sudo apt update --fix-missing && apt upgrade -y | |
sudo apt install --no-install-recommends -y gcc | |
wget "$GO_DOWNLOAD_URL" -O golang.tar.gz | |
tar -zxvf golang.tar.gz | |
sudo mv go ${GOROOT} | |
go version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.bash_aliases