grpc-go的官方安装命令

go get google.golang.org/grpc

无法正常使用。

我们可以用以下的命令替代,达到同样的效果

git clone https://github.com/grpc/grpc-go.git $GOPATH/src/google.golang.org/grpc 
git clone https://github.com/golang/net.git $GOPATH/src/golang.org/x/net 
git clone https://github.com/golang/text.git $GOPATH/src/golang.org/x/text 
go get -u github.com/golang/protobuf/{proto,protoc-gen-go} 
git clone https://github.com/google/go-genproto.git $GOPATH/src/google.golang.org/genproto 

cd $GOPATH/src/ 
go install google.golang.org/grpc

go install 执行完成后没有输出的话说明正确安装了。

分类:

技术点:

相关文章: