问题
I'm running Mac OSX Yosemite.
I'm trying update from golang 1.4 to golang 1.6. I uninstalled golang but I noticed I could still run the go command go version = go1.4.2 darwin/amd64. Why is this so?
The directions aren't super clear IMO. They say
- To remove an existing Go installation This is usually /usr/local/go (done) Remove etc/paths.d/go
- I edited the bash by running
go version go1.4.2 darwin/amd64
回答1:
I ran source ~/.bash_profile and that updated the env variables.
回答2:
I was running into the same issue. I ended up with this solution:
cd /usr/local/bin
rm go
Removes the 'go' command
Then go back to golang.org and re-download the newest version, run the installer and when you run the 'go' command it will display 1.12.9 (As of writing this post).
回答3:
You can try this
sudo apt-get remove golang-go
Then do this
sudo apt-get remove --auto-remove golang-go
来源:https://stackoverflow.com/questions/35643576/removed-golang-but-go-command-still-works