duanjiao8871 2016-08-18 21:07
浏览 78

适用于MacOS的Go版本1.7错误版本

I just downloaded Go 1.7 for Apple OS from here. The package downloaded successfully as go1.7.darwin-amd64.pkg. I deleted my /usr/local/go and /etc/paths.d/go directories as per the standard upgrade instructions, then ran the downloaded package successfully. The install ran fine, and all files in /usr/local/go are dated 8/15/16 3:55PM.

However: Running go version returns: go version go1.6 darwin/amd64.
Running which go returns: /usr/local/bin/go, which is linked to: ../Cellar/go/1.6/bin/go.

I'm on MacOS 10.11.6 (15G31). I've had Cellar interfere with other upgrades and installs... what is the deal with Cellar?? Does the Go package installer need to know to flush the "Cellar" pre-existing contents, and relink /usr/local/bin/go? How do I best clean this up - just delete the Cellar contents and relink /usr/local/bin/go to /usr/local/go/bin/go? My $PATH is pointing to /usr/local/go/bin, but has /usr/local/bin ahead of it.

  • 写回答

1条回答 默认 最新

  • dongshi4078 2017-01-16 20:27
    关注

    brew update && brew upgrade go

    I had a similar problem and this command, as per squiguy's comment, solved it for me.

    评论

报告相同问题?

悬赏问题

  • ¥50 汇编语言除法溢出问题
  • ¥65 C++实现删除N个数据列表共有的元素
  • ¥15 Visual Studio问题
  • ¥15 state显示变量是字符串形式,但是仍然红色,无法引用,并显示类型不匹配
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波
  • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗