* fix: replace sh with shell fix replace terminal with shell fix replace node with js fix replace output with shell fix replace cs with csharp fix replace c++ with cpp fix replace c# with csharp fix replace javasctipt with js fix replace syntax with js fix replace unix with shell fix replace linux with shell fix replace java 8 with java fix replace swift4 with swift fix replace react.js with jsx fix replace javascriot with js fix replace javacsript with js fix replace c++ - with cpp fix: corrected various typos fix: replace Algorithm with nothing fix: replace xaml with xml fix: replace solidity with nothing fix: replace c++ with cpp fix: replace txt with shell fix: replace code with json and css fix: replace console with shell
1.1 KiB
1.1 KiB
title, localeTitle
title | localeTitle |
---|---|
Installing Go in Mac OS X using a tarball | 使用tarball在Mac OS X中安装Go |
使用tarball在Mac OS X中安装Go
链接到tarball
您可以从golang下载页面的Latest Stable部分获取Mac OS tarball存档的链接。
安装过程
在此安装过程中,我们将在撰写本文时使用最新的稳定版本(转至1.9.1)。对于较新版本或较旧版本,只需在第一步中替换链接即可。查看golang下载页面 ,了解当前可用的版本。
安装Go 1.9.1
$ curl -O https://storage.googleapis.com/golang/go1.9.1.darwin-amd64.tar.gz
$ sudo tar -C /usr/local -xzf go1.9.1.darwin-amd64.tar.gz
$ export PATH=$PATH:/usr/local/go/bin
检查go的安装和版本
要检查go是否已成功安装,请使用:
$ go version
这应该在控制台上打印go的版本,同时确保安装顺利进行。