grpc-restful
grpc-restful copied to clipboard
克隆下来,直接用goctl执行proto文件报错
环境: centos7 go 版本: go1.19.2.linux-amd64 goctl版本:1.4.1 执行命令:goctl rpc protoc --go_out=. --go-grpc_out=. --zrpc_out=. sum.proto 报错信息: google/protobuf/descriptor.proto: File not found. google/api/annotations.proto:20:1: Import "google/protobuf/descriptor.proto" was not found or had errors. google/api/annotations.proto:24:8: "google.protobuf.MethodOptions" is not defined. sum.proto:6:1: Import "google/api/annotations.proto" was not found or had errors.
@zhzblackc12 安装个 protobuf 再试试
安装了 protobuf 一样有上面的报错
安装了 protobuf 一样有上面的报错
用这个方法解决了 https://www.cnblogs.com/binHome/p/13061407.html