去获取code.google.com/p/go.net/websocket
我正在尝试使用安装websocket go get
go get
但是,给出x509: failed to load system roots and no roots provided错误。
x509: failed to load system roots and no roots provided
我当时在Google上搜索:cross-compilation requires disabling CGO,所以我export CGO_ENABLED=0,
cross-compilation requires disabling CGO
export CGO_ENABLED=0
但它总是错误
系统:os x 10.9.1
Go版本:go1.2 darwin / amd64
去环境:
GOARCH =“ amd64” GOBIN =“” GOCHAR =“ 6” GOEXE =“” GOHOSTARCH =“ amd64” GOHOSTOS =“ darwin” GOOS =“ darwin” GOPATH =“ / Users / xxx / gocode” GORACE =“” GOROOT =“ / usr / local / Cellar / go / 1.2 / libexec” GOTOOLDIR =“ / usr / local / Cellar / go / 1.2 / libexec / pkg / tool / darwin_amd64” TERM =“ dumb” CC =“ clang” GOGCCFLAGS =“ -g -O2 -fPIC -m64 -fno-caret-diagnostics -Qunused-arguments -fno-common” CXX =“ clang ++” CGO_ENABLED =“ 0”
GOARCH =“ amd64”
GOBIN =“”
GOCHAR =“ 6”
GOEXE =“”
GOHOSTARCH =“ amd64”
GOHOSTOS =“ darwin”
GOOS =“ darwin”
GOPATH =“ / Users / xxx / gocode”
GORACE =“”
GOROOT =“ / usr / local / Cellar / go / 1.2 / libexec”
GOTOOLDIR =“ / usr / local / Cellar / go / 1.2 / libexec / pkg / tool / darwin_amd64”
TERM =“ dumb”
CC =“ clang”
GOGCCFLAGS =“ -g -O2 -fPIC -m64 -fno-caret-diagnostics -Qunused-arguments -fno-common”
CXX =“ clang ++”
CGO_ENABLED =“ 0”
您安装了自制软件吗?试试这个:
brew install go --cross-compile-common --with-cgo --use-gcc
(来源:https : //groups.google.com/forum/#!topic/golang- nuts/gyL_jeOyxQA)
否则,只需安装预构建的软件包。