Mac Home Brew Install go

Source: Internet
Author: User
Tags install go
This is a creation in Article, where the information may have evolved or changed.

Mac Tool Home Brew install go

First you need to install home brew and ruby Environment (because home brew relies on Ruby )

If not, please install the link yourself

Start installing go when you're ready.

Brew Update && Install install go

You also need to configure environment variables after you go to go

Vim ~/.bash_profile  or vim ~/.bash_profile
#GOROOTexport goroot=/usr/local/cellar/go/1.7. 4/libexec#gopathexport gopath= $HOME/golang#gopath binexport PATH= $PATH: $GOPATH/Bin #GOPATH root binexport PATH= $PATH: $GOROOT/bin
SOURCE ~/.bash_profile or Source ~/.bash_profile

OK Go environment configuration is complete, then enter go env to see go details

bogon:~ faunjoe$ GoEnvGoarch="AMD64"GOBIN=""Goexe=""Gohostarch="AMD64"Gohostos="Darwin"GOOS="Darwin"Gopath="/users/faunjoe/work/go"Gorace=""Goroot="/usr/local/cellar/go/1.9/libexec"Gotooldir="/usr/local/cellar/go/1.9/libexec/pkg/tool/darwin_amd64"Gccgo="Gccgo"CC="clang"Gogccflags="-fpic-m64-pthread-fno-caret-diagnostics-qunused-arguments-fmessage-length=0-fdebug-prefix-map=/var/folders /x4/zr94mx8s1n35ysp_rcl6dk7m0000gn/t/go-build768068792=/tmp/go-build-gno-record-gcc-switches-fno-common"CXX="clang++"cgo_enabled="1"Cgo_cflags="-g-o2"Cgo_cppflags=""Cgo_cxxflags="-g-o2"Cgo_fflags="-g-o2"Cgo_ldflags="-g-o2"Pkg_config="Pkg-config"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.