Mac安装PROTOC

从 https://github.com/protocolbuffers/protobuf/releases 下载包

解压并进入,切换至超管

shell> ./autogen.sh
shell> ./configure  --prefix=/usr/local
shell> make && make install
shell> protoc --version
shell> go get https://github.com/golang/protobuf.git
shell> cp /Users/kendo/go/bin/protoc-gen-go /usr/local/bin

#上述命令无法下载,使用下述命令
shell> cd /User/kendo/go/src/github.com/golang
shell> git clone https://github.com/golang/protobuf.git
shell> cd protobuf/protoc-gen-go
shell> go install
shell> cp /Users/kendo/go/bin/protoc-gen-go /usr/local/bin