HOWTO : Install Go Language 1.8 on Ubuntu 16.04 LTS
The current Go version is 1.6 on Ubuntu 16.04. However, the official Go version is 1.8 as of this writing. We need to install Gophers Ubuntu PPA to complete the task.
Step 1 :
Step 2 :
The workspace is "go" at your working directory by default (such as /home/samiux/go).
Append the following lines at the end of the file :
Step 3 :
Log out and re-login.
or
Step 4 :
To test if it is working properly :
Step 5 :
Make sure you create the following directories at the "go" workspace :
You build your project, for example "erp", at "~/go/src/erp".
That's all! See you.
Step 1 :
sudo add-apt-repository ppa:gophers/archive
sudo apt update
sudo apt install golang-1.8Step 2 :
The workspace is "go" at your working directory by default (such as /home/samiux/go).
nano ~/.profileAppend the following lines at the end of the file :
export PATH=$PATH:/usr/lib/go-1.8/bin:$HOME/go/binStep 3 :
Log out and re-login.
or
source ~/.profileStep 4 :
To test if it is working properly :
go version
go envStep 5 :
Make sure you create the following directories at the "go" workspace :
mkdir -p {,~/go/bin,~/go/pkg,~/go/src}You build your project, for example "erp", at "~/go/src/erp".
That's all! See you.