Score:3

Command 'Go' not found after installing on WSL with Ubuntu 20.04. Go is in $PATH

tz flag

I've been struggling with this (seemingly) straightforward installation. If I run echo $PATH I get the following as part of the output /usr/local/go/bin:/usr/local/go-1.19.2/bin. What's even more interesting is that I am able to run sudo /usr/local/go/bin/go version and it works. But go version doesn't.

Here's a detailed description of everything I've done so far:

I installed go by following the exact instructions on the website. I then tried to mv into /usr/local/ but I encountered a weird error that I couldn't figure out. I then simply used cp to move the directory. Then I added the export Path command in my .profile as directed. Command 'go' not found.

I've tried adding PATH to .bashrc, I've tried exporting GOPATH, GOROOT, and various other things suggested in other threads. Nothing seems to work. I then scrubbed everything clean and started again, removing any extra go PATH variables. Still nothing.

Please Help.

cc flag
You may answer your own question, and if upvoted, accept it in a few days, getting it marked as "solved", gaining some rep. points, and helping others.
Tanay Roman avatar
tz flag
@ubfan1 Will do. Thanks!
Score:2
tz flag

Finally figured it out. For SOME reason, the go folder in /usr/local was not executable. Changed the file permissions, and it's working now. Leaving this question here in case someone else finds this useful.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.