widow下 安装 protoc-3.11.2-win64.zip 编译出现问题
来源:10-11 编码实战: 改造账号系统service

慕粉1494638
2020-01-05
https://github.com/protocolbuffers/protobuf/releases/latest
protoc-3.11.2-win64.zip
D:worksrcilestore-server>protoc --proto_path=service/account/proto --go_out=
service/account/proto --micro_out=service/account/proto service/account/proto/us
er.proto
’protoc-gen-go’ 不是内部或外部命令也不是可运行的程序
或批处理文件。
–go_out: protoc-gen-go: Plugin failed with status code 1.
安装了
D:\work\src\filestore-server>go get -u github.com/golang/protobuf/protoc-gen-go
D:\work\src\filestore-server>protoc --proto_path=service/account/proto --go_out=
service/account/proto --micro_out=service/account/proto service/account/proto/us
er.proto
’protoc-gen-micro’ 不是内部或外部命令也不是可运行的程序
或批处理文件。
–micro_out: protoc-gen-micro: Plugin failed with status code 1.
4回答
-
关于可能碰到的这个问题:
Missing 'go_package' option in "user.proto", please specify it with the full Go package path as a future release of protoc-gen-go will require this be specified.
先参考下以下相关链接,看是否能够解决问题哈:
https://stackoverflow.com/questions/61666805/correct-format-of-protoc-go-package
https://stackoverflow.com/questions/62048665/errors-compiling-google-fhir-proto-files-in-go我本地暂时无法复现这个情况。
152020-11-07 -
xiaomo
2020-04-08
go get安装好后,找到protoc-gen-go.exe所在的目录(一般在$GOPATH/bin下), 然后把这个这个目录配置到系统环境PATH里。
022020-06-14 -
慕的地5972662
2020-03-15
同样的错 怎么处理的
00 -
慕粉1494638
提问者
2020-01-05
少安装了什么
022020-04-08
相似问题