Hey folks! I am getting an error related to Go, can anybody help me out? I have got Golang installed on my ubuntu, I followed all the steps as mentioned in the official docs, even the Go folder is present in the usr/local/ directory but when I try to run go version
it says go command not found
@Rakshit.Gondwal You need to add the change to PATH
in your .profile
. You can do this by adding this line to your /etc/profile
.
export PATH=$PATH:/usr/local/go/bin
For more info check the point 2 from the official docs
docs_go
did you add this in this ~/.profile
file ?
Still getting the same error, even after reinstalling ubuntu on my system.
What output do you get from a sudo snap install go
?
I was able to figure this out with the help of Install Golang in Linux | Ubuntu using terminal | Ubuntu 20.04LTS - YouTube.
1 Like