Member-only story
- Remove all go that you might have installed via
apt-get
sudo apt-get remove --auto-remove golang-go
sudo rm -rvf /usr/local/go
2. Get the version of go you want to install https://golang.org/dl/
sudo wget https://golang.org/dl/go1.16.6.linux-amd64.tar.gz
3. Install go
sudo tar -C /usr/local -xzf go1.16.6.linux-amd64.tar.gz
4. Add PATH in ~/.profile
export GOPATH=$HOME/goexport PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
5. source ~/.profile