golang[79]-mac安装指定版本的protobuf
查看版本
brew 安装
brew install protobuf
brew 安装指定版本
1 2
| brew search protobuf brew reinstall protobuf@2.5
|
卸载
brew uninstall protobuf
方法2:源代码编译
1 2 3 4 5 6 7
| brew install automake https://github.com/google/protobuf/releases 找到对应版本下载 ./autogen.sh ./configure make make install protoc --version //如果有之前的版本记得删除
|
go-gen-protobuf
https://github.com/golang/protobuf
1 2 3 4 5
| git checkout v1.3.0 cd proto-gen-go go build go install 即可在$GOPATH/bin中看到
|
参考资料
https://blog.csdn.net/qq_21383435/article/details/81035852
灾难总是接踵而至,这正是世间的常理。你以为只要哭诉一下,就会有谁来救你?如果失败了,就只能说明我不过是如此程度的男人