3
sudo apt-get update
sudo apt-get -y upgrade
wget https://dl.google.com/go/go1.12.6.linux-amd64.tar.gz

using this command I download Go to my device after that I try to extract the downloaded archive and install it to the desired location on the system. using below command

sudo tar -xvf go1.13.3.linux-amd64.tar.gz 
sudo mv go /usr/local

but I got error

sudo tar -xvf go1.12.6.linux-amd64.tar.gz
tar: go1.12.6.linux-amd64.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

what should I do?

Terrance
  • 43,712

1 Answers1

1

Here is the answer to your question

Download the tarball for go

wget https://dl.google.com/go/go1.12.6.linux-amd64.tar.gz

Extract the tarball

tar -xzf go1.12.6.linux-amd64.tar.gz

Move the Folder to /usr/local/

sudo mv go /usr/local/

Add /usr/local/go/bin to the PATH

export PATH=$PATH:/usr/local/go/bin