如何通过Homebrew将Go从1.4升级到1.5?

huangapple go评论96阅读模式
英文:

How to upgrade go from 1.4 to 1.5 via homebrew

问题

我尝试使用brew upgrade go命令进行升级,但始终显示go 1.4.1已经安装。我该如何将go升级到1.5版本?

英文:

I try brew upgrade go

it always show:

go 1.4.1 already installed

how can i upgrade go to 1.5?

答案1

得分: 52

你应该先运行 brew update,然后运行 brew upgrade 来升级由 brew 安装的所有软件。此外,你可以运行 brew upgrade go 来仅升级 go。

英文:

You should run brew update first, then run brew upgrade to upgrade all software installed by brew. Also you can run brew upgrade go to upgrade go only.

答案2

得分: 8

尝试运行以下命令进行翻译:

brew update
brew upgrade

brew install go --cross-compile-common

在运行完brew update/upgrade后,brew upgrade可能会升级go而无需尝试安装它。运行go version命令查看你所安装的版本。

英文:

Try running

brew update
brew upgrade

brew install go --cross-compile-common

brew upgrade might upgrade go alone without having to try to install it, after you run brew update/upgrade try running go version and see which version you have.

答案3

得分: 4

brew update 可能会警告您有多个过时的库,所以:

如果您想检查所有过时的库:

brew update
brew outdated

要升级单个库(比如这个例子中的 go):

brew update
brew upgrade go

要升级所有库:

brew update
brew upgrade
英文:

brew update may warn you about multiple outdated libraries, so:

if you want to check ALL outdated libraries:

brew update
brew outdated

To upgrade a SINGLE library (like go in this case):

brew update
brew upgrade go

To upgrade ALL libraries:

brew update
brew upgrade

huangapple
  • 本文由 发表于 2016年1月4日 17:25:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/34587978.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定