$ apt install -y protobuf-compiler
To generate source code from .proto files, first install protoc, the protocol buffer compiler (https://grpc.io/docs/protoc-installation/). Then install two more modules to help protoc generate source code specific to the Go language:
zzh@ZZHPC:/zdata/MyPrograms/Go/study$ go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go: downloading google.golang.org/protobuf v1.31.0 zzh@ZZHPC:/zdata/MyPrograms/Go/study$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest go: downloading google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 go: downloading google.golang.org/grpc v1.59.0 go: downloading google.golang.org/protobuf v1.28.1
标签:protoc,Protocol,Buffer,golang,grpc,google,org,go,Installation From: https://www.cnblogs.com/zhangzhihui/p/17832353.html