grpc-restful icon indicating copy to clipboard operation
grpc-restful copied to clipboard

克隆下来,直接用goctl执行proto文件报错

Open zhzblackc12 opened this issue 3 years ago • 3 comments

环境: 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 avatar Oct 19 '22 15:10 zhzblackc12

@zhzblackc12 安装个 protobuf 再试试

Angry-Chick avatar Apr 19 '23 09:04 Angry-Chick

安装了 protobuf 一样有上面的报错

z91300 avatar May 06 '23 15:05 z91300

安装了 protobuf 一样有上面的报错

用这个方法解决了 https://www.cnblogs.com/binHome/p/13061407.html

z91300 avatar May 06 '23 15:05 z91300