如何解码要在 Mac OS X 上安装哪个版本的 Golang?
How to decode which version of Golang to install on Mac OS X?
在官方 Golang 网站上,在 Get Started 部分,我们读到:
Install the Go tools
If you are upgrading from an older version of Go you must first remove
the existing version.
Linux, Mac OS X, and FreeBSD tarballs
Download the archive and extract it into /usr/local, creating a Go
tree in /usr/local/go
. For example:
tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
Choose the archive
file appropriate for your installation. For instance, if you are
installing Go version 1.2.1 for 64-bit x86 on Linux, the archive you
want is called go1.2.1.linux-amd64.tar.gz.
(Typically these commands must be run as root or through sudo.)
Add /usr/local/go/bin
to the PATH environment variable. You can do
this by adding this line to your /etc/profile
(for a system-wide
installation) or $HOME/.profile
:
export PATH=$PATH:/usr/local/go/bin
当我们访问 Downloads 部分时,我们会看到许多选项:
go1.4.2
File name Kind OS Arch SHA1 Checksum
go1.4.2.src.tar.gz Source 460caac03379f746c473814a65223397e9c9a2f6
go1.4.2.darwin-386-osx10.6.tar.gz Archive OS X
10.6+ 32-bit fb3e6b30f4e1b1be47bbb98d79dd53da8dec24ec
go1.4.2.darwin-386-osx10.8.tar.gz Archive OS X
10.8+ 32-bit 65f5610fdb38febd869aeffbd426c83b650bb408
go1.4.2.darwin-386-osx10.6.pkg Installer OS X
10.6+ 32-bit 3ed569ce33616d5d36f963e5d7cefb55727c8621
go1.4.2.darwin-386-osx10.8.pkg Installer OS X
10.8+ 32-bit 7f3fb2438fa0212febef13749d8d144934bb1c80
go1.4.2.darwin-amd64-osx10.6.tar.gz Archive OS X
10.6+ 64-bit 00c3f9a03daff818b2132ac31d57f054925c60e7
go1.4.2.darwin-amd64-osx10.8.tar.gz Archive OS X
10.8+ 64-bit 58a04b3eb9853c75319d9076df6f3ac8b7430f7f
go1.4.2.darwin-amd64-osx10.6.pkg Installer OS X
10.6+ 64-bit 3fa5455e211a70c0a920abd53cb3093269c5149c
go1.4.2.darwin-amd64-osx10.8.pkg Installer OS X
10.8+ 64-bit 8fde619d48864cb1c77ddc2a1aec0b7b20406b38
I 运行 Mac OS X Yosemite,版本 10.10.3,配置如下:
- 处理器:2.8 GHz Intel Core i5
- 内存:8 Go 1600 MHz DDR3
- 显卡:Intel Iris 1536 Mo
我应该安装哪个版本的 Go?
最重要的是,为什么(这样我以后可以自己做决定)?
你会想要这个:
go1.4.2.darwin-amd64-osx10.8.pkg Installer OS X 10.8+ 64-bit
注意关键部分:amd64(64位),OS X 10.8+(其中10.10.3满足)。它是 GUI 安装程序,可自动执行大量工作。
Mac OS X常被称为"darwin",这是对低级OS.
的称呼
在官方 Golang 网站上,在 Get Started 部分,我们读到:
Install the Go tools
If you are upgrading from an older version of Go you must first remove the existing version.
Linux, Mac OS X, and FreeBSD tarballs
Download the archive and extract it into /usr/local, creating a Go tree in
/usr/local/go
. For example:
tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
Choose the archive file appropriate for your installation. For instance, if you are installing Go version 1.2.1 for 64-bit x86 on Linux, the archive you want is called go1.2.1.linux-amd64.tar.gz.
(Typically these commands must be run as root or through sudo.)
Add
/usr/local/go/bin
to the PATH environment variable. You can do this by adding this line to your/etc/profile
(for a system-wide installation) or$HOME/.profile
:
export PATH=$PATH:/usr/local/go/bin
当我们访问 Downloads 部分时,我们会看到许多选项:
go1.4.2
File name Kind OS Arch SHA1 Checksum
go1.4.2.src.tar.gz Source 460caac03379f746c473814a65223397e9c9a2f6
go1.4.2.darwin-386-osx10.6.tar.gz Archive OS X 10.6+ 32-bit fb3e6b30f4e1b1be47bbb98d79dd53da8dec24ec
go1.4.2.darwin-386-osx10.8.tar.gz Archive OS X 10.8+ 32-bit 65f5610fdb38febd869aeffbd426c83b650bb408
go1.4.2.darwin-386-osx10.6.pkg Installer OS X 10.6+ 32-bit 3ed569ce33616d5d36f963e5d7cefb55727c8621
go1.4.2.darwin-386-osx10.8.pkg Installer OS X 10.8+ 32-bit 7f3fb2438fa0212febef13749d8d144934bb1c80
go1.4.2.darwin-amd64-osx10.6.tar.gz Archive OS X 10.6+ 64-bit 00c3f9a03daff818b2132ac31d57f054925c60e7
go1.4.2.darwin-amd64-osx10.8.tar.gz Archive OS X 10.8+ 64-bit 58a04b3eb9853c75319d9076df6f3ac8b7430f7f
go1.4.2.darwin-amd64-osx10.6.pkg Installer OS X 10.6+ 64-bit 3fa5455e211a70c0a920abd53cb3093269c5149c
go1.4.2.darwin-amd64-osx10.8.pkg Installer OS X 10.8+ 64-bit 8fde619d48864cb1c77ddc2a1aec0b7b20406b38
I 运行 Mac OS X Yosemite,版本 10.10.3,配置如下:
- 处理器:2.8 GHz Intel Core i5
- 内存:8 Go 1600 MHz DDR3
- 显卡:Intel Iris 1536 Mo
我应该安装哪个版本的 Go?
最重要的是,为什么(这样我以后可以自己做决定)?
你会想要这个:
go1.4.2.darwin-amd64-osx10.8.pkg Installer OS X 10.8+ 64-bit
注意关键部分:amd64(64位),OS X 10.8+(其中10.10.3满足)。它是 GUI 安装程序,可自动执行大量工作。
Mac OS X常被称为"darwin",这是对低级OS.
的称呼