upgrade golang to 1.1.5 in vscode not showing

84 views
Skip to first unread message

Dr. Lincy Jim

unread,
Mar 24, 2021, 11:26:54 PM3/24/21
to golang-nuts

Hi,

My os is windows 10 on which i have installed golang1.16 andd the version of golang on my vscode is1.13
but since I am using my laptop for work ,i have been asked to upgrade from 1.13 to 1.15
I did the following steps in terminal of vscode-ubuntu
$ sudo wget https://golang.org/dl/go1.15.5.linux-amd64.tar.gz
$ sudo tar -C /usr/local -xzf go1.15.5.linux-amd64.tar.gz
$ export PATH=$PATH:/usr/local/go/bin
$ source ~/.bashrc
$ go version

still it shows version 1.13

kindly guide
thanking in advance

Kurtis Rader

unread,
Mar 24, 2021, 11:38:34 PM3/24/21
to Dr. Lincy Jim, golang-nuts
You say you are using Windows 10 but the commands you showed us makes it clear you are using Go in WSL (Windows Subsystem for Linux) rather than native Windows 10. I mention this because it is an important detail.

You modify the PATH env var in your current shell but then run `source ~/.bashrc`. If your ~/.bashrc modifies the PATH env var your manual edit will probably have no effect. What does `which -a go` output? It seems likely that you have more than one installation of the Go toolchain with the 1.13 version being some place other than /usr/local/go/bin.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/ac8694ce-6a9d-4ae1-9e91-66b283f1ac50n%40googlegroups.com.


--
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

Dr. Lincy Jim

unread,
Mar 25, 2021, 12:15:27 AM3/25/21
to golang-nuts

Hi Kurtis,

Yes I am using Go in WSL(Sorry I forgot to mention it)
go 1.13 version is in Networks 
\\wsl$\Ubuntu\home\lincy\go

but the 1.15 version is in  Networks  \\wsl$\Ubuntu\user\local (go 1.15 has been extracted here)

Should i manually copy the go 15 folder and place it where go 13 is?
In Vscode at the bottom of the  window it shows go 1.13? how do I change it to go 1.15

kindly guide
thanking in advance


Kurtis Rader

unread,
Mar 25, 2021, 12:41:41 AM3/25/21
to Dr. Lincy Jim, golang-nuts
On Wed, Mar 24, 2021 at 9:16 PM Dr. Lincy Jim <drlin...@gmail.com> wrote:
Yes I am using Go in WSL(Sorry I forgot to mention it)
go 1.13 version is in Networks 
\\wsl$\Ubuntu\home\lincy\go

but the 1.15 version is in  Networks  \\wsl$\Ubuntu\user\local (go 1.15 has been extracted here)

Should i manually copy the go 15 folder and place it where go 13 is?
In Vscode at the bottom of the  window it shows go 1.13? how do I change it to go 1.15

This is really a question for your whomever told you to upgrade from Go 1.13 to 1.15. We have no idea why you were told to upgrade. Or who told you to do the upgrade. Presumably it was the IT department responsible for the computers you use at your $dayjob.

I'll start by pointing out that you did not show us the output of `which -a go`. Nonetheless, the information you did provide implies you have the WSL equivalent of `\\wsl$\Ubuntu\home\lincy\go` (version 1.13) in your PATH ahead of `\\wsl$\Ubuntu\user\local` (version 1.15). Perhaps you should just delete your personal copy of the Go toolchain installed in `\\wsl$\Ubuntu\home\lincy\go`. But, again, not knowing anything about your $dayjob computer environment it might also be the case that you should have installed the new version of Go in your personal directory rather than /usr/local/.

Dr. Lincy Jim

unread,
Mar 25, 2021, 6:28:37 PM3/25/21
to golang-nuts
Hi Kurtis,

I reinstalled vscode,ubuntu and wsl as the cache kept holding onto previous installations of go.
Now it correctly shows go 15 at the bottom of the vscode window.
I typed 'which-a go'
now it shows usr/local/go/bin/go
Now the issue has been resolved.Thanks again.
Reply all
Reply to author
Forward
0 new messages