V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
qiushui777
V2EX  ›  以太坊

以太坊编译找不到 package,求大佬指点

  •  
  •   qiushui777 · 2019-11-25 10:37:08 +08:00 · 2960 次点击
    这是一个创建于 1830 天前的主题,其中的信息可能已经有所发展或是发生改变。

    在下 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
    
    

    感觉自己要崩溃。。。

    1 条回复    2019-11-25 20:05:30 +08:00
    qiushui777
        1
    qiushui777  
    OP
       2019-11-25 20:05:30 +08:00
    使用最新版的 golang, 1.13 解决了这个问题。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5443 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 08:25 · PVG 16:25 · LAX 00:25 · JFK 03:25
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.