去获得失败:x509:未能加载系统根目录并且没有提供根目录 [英] go get failed: x509: failed to load system roots and no roots provided

查看:776
本文介绍了去获得失败:x509:未能加载系统根目录并且没有提供根目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


去获取code.google.com/p/go.net/websocket


m试图使用去获取



然后,给定 x509:failed to加载系统根目录并且没有提供根目录错误。

我是google它:交叉编译需要禁用CGO code>,所以我出口CGO_ENABLED = 0



但它总是错误



system:os x 10.9.1



go版本:go1.2达尔文/ amd64



去env:


GOARCH =amd64



GOBIN =



GOCHAR =6



GOEXE =



GOHOSTARCH =amd64



GOHOSTOS =达尔文



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



解决方案

您是否安装了自制软件?试试这个:
$ b

brew install go --cross-compile-common --with-cgo --use-gcc



(来源: https://groups.google.com/forum/#!topic/golang-nuts/gyL_jeOyxQA



否则,只需安装pre-建立包。


go get code.google.com/p/go.net/websocket

I'm trying to install websocket using go get

However, given the x509: failed to load system roots and no roots provided error.

I was google it: cross-compilation requires disabling CGO, so i export CGO_ENABLED=0,

but it always error

system: os x 10.9.1

go version: go1.2 darwin/amd64

go env:

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"

解决方案

Did you install with homebrew? Try this:

brew install go --cross-compile-common --with-cgo --use-gcc

(source: https://groups.google.com/forum/#!topic/golang-nuts/gyL_jeOyxQA)

Otherwise, just install the pre-built package.

这篇关于去获得失败:x509:未能加载系统根目录并且没有提供根目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆