解决 cannot find package "golang.org/x/crypto/ripemd160" in any of:

报错信息:

./btcutil/address.go:18:2: cannot find package "golang.org/x/crypto/ripemd160" in any of:

        /usr/local/go/src/golang.org/x/crypto/ripemd160 (from $GOROOT)

        /root/go/src/golang.org/x/crypto/ripemd160 (from $GOPATH)

解决方式

cd $GOPATH/src/golang.org/x

如果没有 golang.org/x  则创建相关目录

执行

git clone https://github.com/golang/crypto.git


报错信息:

rpc/walletrpc/api.pb.go:68:2: cannot find package "golang.org/x/net/context" in any of:

        /usr/local/go/src/golang.org/x/net/context (from $GOROOT)

        /root/go/src/golang.org/x/net/context (from $GOPATH)

执行

cd $GOPATH/src/golang.org/x

git clone https://github.com/golang/net.git


报错信息:

rpc/walletrpc/api.pb.go:69:2: cannot find package "google.golang.org/grpc" in any of:

        /usr/local/go/src/google.golang.org/grpc (from $GOROOT)
        /root/go/src/google.golang.org/grpc (from $GOPATH)
rpc/rpcserver/server.go:26:2: cannot find package "google.golang.org/grpc/codes" in any of:
        /usr/local/go/src/google.golang.org/grpc/codes (from $GOROOT)
        /root/go/src/google.golang.org/grpc/codes (from $GOPATH)
rpcserver.go:24:2: cannot find package "google.golang.org/grpc/credentials" in any of:
        /usr/local/go/src/google.golang.org/grpc/credentials (from $GOROOT)

        /root/go/src/google.golang.org/grpc/credentials (from $GOPATH)

rpc/rpcserver/log.go:21:2: cannot find package "google.golang.org/grpc/grpclog" in any of:

        /usr/local/go/src/google.golang.org/grpc/grpclog (from $GOROOT)

        /root/go/src/google.golang.org/grpc/grpclog (from $GOPATH)

解决方式:

创建目录

mkdir -p $GOPATH/src/google.golang.org/

cd $GOPATH/src/google.golang.org/

git clone https://github.com/Agzs/grpc grpc

安装

cd $GOPATH/src/

go install google.golang.org/grpc


报错信息:

../../../golang.org/x/net/idna/idna.go:23:2: cannot find package "golang.org/x/text/secure/bidirule" in any of:
        /usr/local/go/src/golang.org/x/text/secure/bidirule (from $GOROOT)
        /root/go/src/golang.org/x/text/secure/bidirule (from $GOPATH)
../../../golang.org/x/net/idna/idna.go:24:2: cannot find package "golang.org/x/text/unicode/bidi" in any of:
        /usr/local/go/src/golang.org/x/text/unicode/bidi (from $GOROOT)
        /root/go/src/golang.org/x/text/unicode/bidi (from $GOPATH)
../../../golang.org/x/net/idna/idna.go:25:2: cannot find package "golang.org/x/text/unicode/norm" in any of:
        /usr/local/go/src/golang.org/x/text/unicode/norm (from $GOROOT)

        /root/go/src/golang.org/x/text/unicode/norm (from $GOPATH)

执行

cd $GOPATH/src/golang.org/x

git clone  https://github.com/golang/text.git



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值