douyou7102
douyou7102
2019-08-27 10:30
浏览 67
已采纳

无法使用自制软件在Mac上安装go的特定版本

i am trying to install go lang version 1.12.7 with

brew install go@1.12.7

but its saying formula is wrong. Any help would be appreciated.

图片转代码服务由CSDN问答提供 功能建议

我正尝试使用以下语言安装Go lang版本1.12.7

 <  code> brew install go@1.12.7 
   
 
 

,但其公式是错误的。 任何帮助将不胜感激。

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douhuang5623
    douhuang5623 2019-08-27 12:10
    已采纳

    There is no "simple way".

    By default brew allows you set only last patch version for go1.12, because of formula file (right now it is 1.12.9).

    But you can do it manually.

    :~$ cd "$(brew --repo homebrew/core)"
    :~$ git log --oneline Formula/go.rb # To see all old versions
    :~$ git reset --hard go1.12.7
    HEAD is now at fa46027fe go: update 1.12.7 bottle.
    
    :~$ HOMEBREW_NO_AUTO_UPDATE=1 brew install go@1.12
    ==> Downloading https://homebrew.bintray.com/bottles/go-1.12.7.mojave.bottle.tar.gz
    
    点赞 评论

相关推荐