其他分享
首页 > 其他分享> > grpc和protoc的安装

grpc和protoc的安装

作者:互联网

三. protoc的安装:

   1. 安装grpc的相关依赖,执行以下命令:

    yum install -y gcc-c++ autoconf libtool

    yum groupinstall -y "Development Tools"

   2. 下载源码:

     

是用wget下载protobuf包

wget https://github.com/protocolbuffers/protobuf/releases/download/v3.10.0/protobuf-all-3.10.0.tar.gz

tar zvxf protobuf-all-3.10.0.tar.gz

cd protobuf-3.10.0/

./autogen.sh

./configure -prefix=/usr/local/

make

make install

ldconfig

  3. protoc-gen-go插件安装

go get -u github.com/golang/protobuf/protoc-gen-go

cd /home/gopath/pkg/mod/github.com/golang/protobuf@v1.5.2/protoc-gen-go

go build

cp protoc-gen-go /usr/local/bin/

   至此protoc已经安装完成。

标签:protoc,protobuf,tar,grpc,3.10,go,安装,gen
来源: https://www.cnblogs.com/b02330224/p/15922672.html