Begin by running the following command to add the golang backports ppa:
sudo add-apt-repository ppa:longsleep/golang-backports
If you get an error such as “add-apt-repository command not found” then you need to run the following command to install add-apt-repository:
sudo apt-get install software-properties-common
Then run the following two commands to update your packages from the ppa and install Go version 1.11:
sudo apt-get update
sudo apt-get install golang-1.11
Now we need to add the go binary to our path. I like to put his in my `.profile` by typing:
nano ~/.profile
Then scrolling to the bottom and adding the following line
PATH="$PATH:/usr/lib/go-1.11/bin"
Then use the source command to reread your profile.
source ~/.profile
Now type:
go version
And you should see that Go 1.11 is installed.
Comments
One thought on “Install Go 1.11 on Ubuntu 18.04”