LoginSignup
8
7

More than 5 years have passed since last update.

最新のGoをインストール

Last updated at Posted at 2015-07-05

解凍するだけの方法

amd64の場合
VERSION=1.6.2
#VERSION=1.7beta2
ARCH=amd64
#ARCH=386

wget https://storage.googleapis.com/golang/go${VERSION}.linux-${ARCH}.tar.gz
tar xzf go${VERSION}.linux-${ARCH}.tar.gz -C ~
~/.bashrc
export GOROOT=$HOME/go
export GOPATH=$HOME/Documents/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
  • buildサイズ
version ~/go/ helloworld
1.6.2 322M 2.2M
1.7beta2 252M 1.6M

gvmを使う方法

sudo apt-get install -y bison

bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
source $HOME/.gvm/scripts/gvm
gvm listall
gvm install go1.6.2
gvm use go1.6.2 --default
export GOPATH=$HOME/bin/gopath
go version
8
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
7