gpt4 book ai didi

macos - 如何解码在 Mac OS X 上安装哪个版本的 Golang?

转载 作者:IT王子 更新时间:2023-10-29 01:52:54 24 4
gpt4 key购买 nike

在 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

我运行 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”,这是低级操作系统的名称。

关于macos - 如何解码在 Mac OS X 上安装哪个版本的 Golang?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31508390/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com