How to install Go1.8 in ubuntu14.04

Server environment

1
2
3
4
5
$ cat /etc/issue
Ubuntu 14.04.5 LTS

# go version
go version go1.8.4 linux/amd64

Download Install package

1
2
3
$ wget https://storage.googleapis.com/golang/go1.8.4.linux-amd64.tar.gz
$ tar -zxvf go1.8.4.linux-amd64.tar.gz
$ sudo mv go /usr/local

Create the GOPATH directory

1
$ mkdir -p /home/liang/code/golang

Add this code in file: ~/.bash_profile

1
$ vim ~/.bash_profile
1
2
3
export GOROOT=/usr/local/go 
export GOPATH=$HOME/code/golang
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
1
$ source ~/.bash_profile
Share