Mac下protobuf生成文件报错问题解决办法,windows下就不会这么麻烦了,如果linux下出现类似报错信息按照下面的解决逻辑依然适用。
1、由--go_out引发的报错
1.报错信息:
user@C02FP58GML7H pbfile % protoc --go_out=./ ./user.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.
2.解决办法:
3.结果示例:
```bash
user@C02FP58GML7H bin % vim ~/.bash_profile