美文网首页golang 编程笔记
Ubuntu18搭建grpc与protobuf环境

Ubuntu18搭建grpc与protobuf环境

作者: dongzd | 来源:发表于2020-03-24 20:04 被阅读0次

安装protobuf

1.进入链接下载protoc
2.把include下文件放入/usr/local/include下

安装GRPC

1.因为google.golang.org/grpc会被墙掉,所以去github.com/grpc下载好包
2.把下载好的包放在GOPATH下的google.golang.org/grpc去
3.安装

go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
cd github.com/golang/protobuf/
make
make install

会在GOPATH/bin下生成可执行文件(对于win需要go install)

相关文章

网友评论

    本文标题:Ubuntu18搭建grpc与protobuf环境

    本文链接:https://www.haomeiwen.com/subject/vouayhtx.html