当前位置:首页 > 操作系统 > MacOs

MacOS安装和升级protobuf

团队的新手同学连grpc的环境都搭不起来, 也就有了本篇简单的教程。

GRpc根本用到的俩个东西: protobuf&protoc-gen-go

protoc的安装

MacOS 并不需要复杂的安装

brew info protobuf //查看现有protobuf包
brew install protobuf //安装protobuf
protoc --version //查看protobuf版本

因我的版本比他的低,所以我需要更新最新版本。

brew uninstall protobuf --force //卸载原有
brew update
brew info //查看版本一致,跟他一致
brew install protobuf


protoc-gen-go 的安装

https://github.com/golang/protobuf

go get -u github.com/golang/protobuf/protoc-gen-go


扩展阅读




【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐