mac上生成go文件失败报错,gRpc-- protoc-gen-go: program not found or is not executable

时间:2020-07-16 19:37:45   收藏:0   阅读:429

根据proto文件生成对应的go文件

搭建grpc环境

brew tap grpc/grpc
brew install protobuf
go get -u github.com/golang/protobuf/proto
go get -u github.com/golang/protobuf/protoc-gen-go

生成go文件命令

protoc --go_out=plugins=grpc:. *.proto

protoc-gen-go: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--go_out: protoc-gen-go: Plugin failed with status code 1.

之后source ~/.bash_profile即可

原文:https://www.cnblogs.com/codeBang/p/13324122.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!