Protobuf生成文件报错

Python127

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

输入验证码查看隐藏内容

扫描二维码关注本站微信公众号 Johngo学长
或者在微信里搜索 Johngo学长
回复 svip 获取验证码
wechat Johngo学长