go get code.google.com/p/go.net/websocket
我正在尝试使用go get
但是,考虑到x509: failed to load system roots and no roots provided
错误。
我是google it:cross-compilation requires disabling CGO
,所以我export CGO_ENABLED=0
,
但总是错误
system:os x 10.9.1
go version:go1.2 darwin / amd64
go env:
GOARCH = “AMD64”
GOBIN = “”
GOCHAR = “6”
GOEXE = “”
GOHOSTARCH = “AMD64”
GOHOSTOS = “达尔文”
GOOS = “达尔文”
GOPATH = “/用户/ XXX / gocode”
GORACE = “”
GOROOT = “/ USR /本地/地窖/去/ 1.2 /的libexec”
GOTOOLDIR = “/ USR /本地/地窖/去/ 1.2 /的libexec /包装/工具/ darwin_amd64”
TERM = “哑”
CC = “铛”
GOGCCFLAGS =“ - g -O2 -fPIC -m64 -fno-caret-diagnostics -Qunused-arguments -fno-common“
CXX = “铛++”
CGO_ENABLED = “0”
答案 0 :(得分:2)
你用自制软件安装了吗?试试这个:
brew install go --cross-compile-common --with-cgo --use-gcc
(来源:https://groups.google.com/forum/#!topic/golang-nuts/gyL_jeOyxQA)
否则,只需安装预先构建的包。