Files
freeCodeCamp/guide/chinese/go/installing-go/mac-tarball/index.md
Randell Dawson 0a1eeea424 fix(guide) Replace invalid prism code block names (#35961)
* 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
2019-05-15 19:08:19 +02:00

32 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Installing Go in Mac OS X using a tarball
localeTitle: 使用tarball在Mac OS X中安装Go
---
### 使用tarball在Mac OS X中安装Go
#### 链接到tarball
您可以从[golang下载页面](https://golang.org/dl/)的Latest Stable部分获取Mac OS tarball存档的链接。
![screenshot of golang's download page as of this writting, highliting link](https://raw.githubusercontent.com/AlexandroPerez/resources/master/img/mac_tarball.jpg "Mac tarball链接")
#### 安装过程
> 在此安装过程中我们将在撰写本文时使用最新的稳定版本转至1.9.1)。对于较新版本或较旧版本,只需在第一步中替换链接即可。查看[golang下载页面](https://golang.org/dl/) ,了解当前可用的版本。
##### 安装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是否已成功安装请使用
```shell
$ go version
```
这应该在控制台上打印go的版本同时确保安装顺利进行。