Skip to content

Instantly share code, notes, and snippets.

@tkc tkc/install-go.sh forked from ndaidong/install-go.sh
Created Aug 10, 2018

Embed
What would you like to do?
Install Go 1.10 in Ubuntu 16+
#!/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
@tkc

This comment has been minimized.

Copy link
Owner Author

commented Aug 10, 2018

.bash_aliases

export GOPATH=/usr/local/lib/go
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.