天天看點

brpc的安裝---20220620可用

參考文檔:

官方文檔:​​​https://github.com/apache/incubator-brpc/blob/master/docs/cn/getting_started.md​​​​https://developer.aliyun.com/article/939759​​

環境配置:centos

安裝步驟:

  1. 下載下傳brpc源碼包:​​https://gitee.com/baidu/BRPC?_from=gitee_search​​
  2. 安裝依賴項:
  • sudo yum install epel-release
  • sudo yum install git gcc-c++ make openssl-devel gflags-devel protobuf-devel protobuf-compiler leveldb-devel
  1. 安裝brpc
  • mkdir bld
  • cd bld
  • cmake3 -DBUILD_SHARED_LIBS=ON ..
  • make -j 8
  • sudo make install

測試

進入examples找個例子試一下即可

Tips

  • 安裝gperftools,yum install gperftools,在brpc給的examples中的http_c++中需要用到,沒有這個會編譯報錯