gRPC学习 c++
Install —— Building from source
MacOS
首先安装Xcode,然后安装命令行工具
$ sudo xcode-select --install
从Homebrew安装一些包
$ brew install autoconf automake libtool shtool gflags
(文档上mac没要求安装pkg-config,但后面make时会报错)
$ brew install pkg-config
Clone源码
$ git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc
$ cd grpc
$ git submodule update --init
make
$ make && sudo make install
文档上说会源码编译自动安装好protobuf,但我安装时没有,所以手动安装一下protobuf
$ cd third_party/protobuf
$ make && sudo make install