$ cd protoc-x.x.x-osx-x86_64/bin
$ mv protoc $GOPATH/bin
$GOPATH为你本机的实际文件夹地址
$ protoc --version
libprotoc x.x.x
localhost:bin qiqi$ mv protoc $GOPATH/bin
localhost:bin qiqi$ protoc --version
libprotoc 3.21.10
localhost:~ qiqi$ go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
localhost:~ qiqi$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go: downloading google.golang.org/grpc v1.51.0
localhost:~ qiqi$
$ go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest