zoukankan      html  css  js  c++  java
  • mac home brew install go

    mac利器home brew安装Go

    首先你得需要安装home brew和ruby环境(因为home brew依赖ruby) 

    如果没有请自行到链接安装

    准备好之后就开始安装go

    brew update && brew upgrade
    brew install git
    brew install mercurial
    brew install go

    安转go之后还需要配置环境变量

    vim ~/.bash_profile  or vim ~/.bash_profile
    #GOROOT
    export GOROOT=/usr/local/Cellar/go/1.7.4/libexec
    
    #GOPATH
    export GOPATH=$HOME/GoLang
    
    #GOPATH bin
    export PATH=$PATH:$GOPATH/bin
    
    #GOPATH root bin
    export PATH=$PATH:$GOROOT/bin
    source ~/.bash_profile or source ~/.bash_profile

    ok go环境配置完毕,接下来输入go env即可看到go的详细信息

    bogon:~ faunjoe$ go env
    GOARCH="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"
  • 相关阅读:
    iOS:CALayer锚点的使用
    iOS:UIView的CALayer基本演练
    iOS:iOS中的几种动画
    iOS:CALayer核心动画层
    Objective-C:KVO机制
    Objective-C:KVC机制
    投资方式集汇
    曝光卖假币的店铺和旺旺ID
    android 的开源输入法介绍,及 自动触摸的实现方法
    Intra Refresh of H264 encoder
  • 原文地址:https://www.cnblogs.com/faunjoe88/p/7457882.html
Copyright © 2011-2022 走看看