douchi7073 2017-02-06 20:10
浏览 69
已采纳

Golang 1.6.2无法在OSX Sierra上升级

I just upgraded to OSX Sierra from El Capitan. As such, I also need to upgrade my Golang compiler from 1.6.2 since it does not support Sierra.

I downloaded the latest 1.7.5 pkg installer and ran it, getting the prompt that it would remove previous versions of Go, and it said it was successful. But when I run go version it still says go1.6.2 darwin/amd6.

I have gone so far as to manually delete my /usr/local/bin/go directory and run the 1.7.5 installer again, but go version still says go1.6.2 darwin/amd6. I have also restarted my terminal window and even the full computer between attempts.

What is going wrong? How can I get my Go compiler to update?

  • 写回答

1条回答 默认 最新

  • dougou8458 2017-02-06 20:25
    关注

    I was incorrect in my question. I actually deleted usr/local/go, not usr/local/bin/go. I went back and deleted both directories manually, then ran the 1.7.5 package installer again. After restarting my terminal window, go version now shows me I am on 1.7.5 and it appears to be running correctly when I compile my code.

    Still interesting that the package installer did not do this automatically like it said it would. This could work as a solution if someone else is having the same problem.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?