Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alekc/5516a6c443214eda5e1fb4a398355386 to your computer and use it in GitHub Desktop.
Save alekc/5516a6c443214eda5e1fb4a398355386 to your computer and use it in GitHub Desktop.
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
source /root/.gvm/scripts/gvm
# Add bison dependency
apt-get install -y bison
# Add go. Note: you need to go through the 1.4 due to toolchain being replaced in 1.5 version. Not
# sure if that's still a case for 1.6, but just in case...
gvm install go1.4
gvm use 1.4
# check go version
go version
go version go1.4 linux/amd64
# list available go version
gvm listall
#Right now the latest stable version is 1.6.1
...
go1.6
go1.6.1
go1.6beta1
go1.6beta2
go1.6rc1
go1.6rc2
....
# Install go 1.6.1 and set it as default version
gvm install go1.6.1
gvm use 1.6.1 --default
# Test it
$go version
go version go1.6.1 linux/amd64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment