GRPC 安装

https://github.com/grpc/grpc/blob/master/INSTALL.md

Pre-requisites

  $ [sudo] apt-get install build-essential autoconf libtool pkg-config

  If you plan to build from source and run tests, install the following as well:

  $ [sudo] apt-get install libgflags-dev libgtest-dev

 $ [sudo] apt-get install clang libc++-dev

 

Protoc

  By default gRPC uses protocol buffers, you will need the protoc compiler to generate stub server and client code.

  If you compile gRPC from source, as described below, the Makefile will automatically try compiling the protoc in third_party \

if you cloned the repository recursively and it detects that you do not already have 'protoc' compiler installed.

  If 'protoc' compiler has not been installed, following commands can be used for installation.

  $ cd grpc/third_party/protobuf

  $ sudo make install   # 'make' should have been run by core grpc

 

Build from Source

  For developers who are interested to contribute, the following commands show how to compile the gRPC C Core library.

  $ git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc

  $ cd grpc

  $ git submodule update --init

  $ make

  $ [sudo] make install

posted @ 2018-05-24 14:16  andy1327  阅读(132)  评论(0编辑  收藏  举报