LoginSignup
4
5

More than 5 years have passed since last update.

golangをMacOSX Maverickにインストールするには

Last updated at Posted at 2014-07-26

いくつかの方法がある。gcc-goはよくわからないので省略

オフィシャルサイトのバイナリを利用してインストールを行う

下記の場所からインストーラーをダウンロードし、インストールを行う

Homebrewを利用してインストールを行う(クロスコンパイル環境なし)

コマンドライン

brew install go

Homebrewを利用してインストールを行う(クロスコンパイル環境あり)

brew install go --cross-compile-all

実行結果

[~]$ brew install go --cross-compile-all
==> Downloading https://storage.googleapis.com/golang/go1.3.src.tar.gz
######################################################################## 100.0%
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> ./make.bash --no-clean
==> Caveats
As of go 1.2, a valid GOPATH is required to use the `go get` command:
  http://golang.org/doc/code.html#GOPATH

`go vet` and `go doc` are now part of the go.tools sub repo:
  http://golang.org/doc/go1.2#go_tools_godoc

To get `go vet` and `go doc` run:
  go get code.google.com/p/go.tools/cmd/godoc
  go get code.google.com/p/go.tools/cmd/vet

You may wish to add the GOROOT-based install location to your PATH:
  export PATH=$PATH:/usr/local/opt/go/libexec/bin

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
?  /usr/local/Cellar/go/1.3: 7478 files, 1.2G, built in 4.5 minutes

情報源

4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5