在下 golang 小白,操作完全根据文档,当时总是报错说找不到包,我看网上的教程都是直接安装 golang 后就编译啊,但是我这就不行,不自动下载那些包,非常奇怪。求大佬们指点下。
go 环境
export GOROOT=/usr/local/go
export GOPATH=/home/sam/go
export PATH=$PATH:/usr/local/go/bin
sam@ubuntu:~/work/blockchain/go-ethereum$ go version
go version go1.12.7 linux/amd64
下载 go-ethereum 后如下错误
sam@ubuntu:~/work/blockchain/go-ethereum$ make all
build/env.sh go run build/ci.go install
internal/build/azure.go:25:2: cannot find package "github.com/Azure/azure-storage-blob-go/azblob" in any of:
/usr/local/go/src/github.com/Azure/azure-storage-blob-go/azblob (from $GOROOT)
/home/sam/work/blockchain/go-ethereum/build/_workspace/src/github.com/Azure/azure-storage-blob-go/azblob (from $GOPATH)
build/ci.go:61:2: cannot find package "github.com/cespare/cp" in any of:
/usr/local/go/src/github.com/cespare/cp (from $GOROOT)
/home/sam/work/blockchain/go-ethereum/build/_workspace/src/github.com/cespare/cp (from $GOPATH)
internal/build/pgp.go:27:2: cannot find package "golang.org/x/crypto/openpgp" in any of:
/usr/local/go/src/golang.org/x/crypto/openpgp (from $GOROOT)
/home/sam/work/blockchain/go-ethereum/build/_workspace/src/golang.org/x/crypto/openpgp (from $GOPATH)
common/types.go:31:2: cannot find package "golang.org/x/crypto/sha3" in any of:
/usr/local/go/src/golang.org/x/crypto/sha3 (from $GOROOT)
/home/sam/work/blockchain/go-ethereum/build/_workspace/src/golang.org/x/crypto/sha3 (from $GOPATH)
Makefile:20: recipe for target 'all' failed
make: *** [all] Error 1
感觉自己要崩溃。。。
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.