Golang x509在Mac OS X上无法加载系统根目录错误

褐色:

我在本地计算机上进行api调用时遇到错误。

x509: failed to load system roots and no roots provided

去环境:

GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/usr/local/Cellar/go/1.3.3"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.3.3/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"
褐色:

您需要在没有cgo的情况下从homebrew安装go:

brew remove go
brew install go --without-cgo

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章