Removed golang but go command still works?

守給你的承諾、 提交于 2019-12-14 03:26:35

问题


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

  1. To remove an existing Go installation This is usually /usr/local/go (done) Remove etc/paths.d/go
  2. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!