Issue with installing golang on wsl2 - (gzip: stdin: not in gzip format) #6021
-
I am having issue installing golang using the tar file on my Ubuntu 20.04 Linux distro on WSL 2. This is the error I am getting: mp@L00000:~$ tar -C /usr/local -xzvf go1.15.2.linux-amd64.tar.gz gzip: stdin: not in gzip format I downloaded the tar/gz file using the following wget (I also tried with curl, but faced same issue): mp@L00000:~$ wget https://golang.org/dl/go1.15.2.linux-amd64.tar.gz -o go1.15.2.linux-amd64.tar.gz This is my Linux distro: No LSB modules are available. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Because you are downloading it incorrectly. You need to use -O instead of -o as parameter. |
Beta Was this translation helpful? Give feedback.
-
I am having issue installing golang using the tar file |
Beta Was this translation helpful? Give feedback.
Because you are downloading it incorrectly. You need to use -O instead of -o as parameter.
wget https://golang.org/dl/go1.15.2.linux-amd64.tar.gz -O go1.15.2.linux-amd64.tar.gz