Centos7.3编译安装grpc
2020-02-11 15:45
369 查看
相关工具
yum install -y gcc gcc-c++ autoconf libtool yum groupinstall -y "Development Tools"
下载源码
git clone https://github.com/grpc/grpc.git cd grpc git submodule update --init
编译安装protobuf
cd third_party/protobuf/ ./autogen.sh ./configure make make install ldconfig # refresh shared library cache. which protoc protoc --version
autogen.sh里需要下载Google Code的代码,需要保障其能被访问
编译安装grpc
cd ../.. make
问题:
/root/git/grpc/bins/opt/grpc_cpp_plugin: error while loading shared libraries: libprotoc.so.15: cannot open shared object file: No such file or directory
解决办法:
echo $LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/lib/:/root/git/grpc/libs/opt/ make make install
测试C++ Demo
cd examples/cpp/helloworld make
问题:
Package protobuf was not found in the pkg-config search path. Perhaps you should add the directory containing `protobuf.pc' to the PKG_CONFIG_PATH environment variable No package 'protobuf' found
解决办法:
echo $PKG_CONFIG_PATH export PKG_CONFIG_PATH=/root/git/grpc/libs/opt/pkgconfig:/root/git/grpc/third_party/protobuf make ./greeter_server & ./greeter_client
转载于:https://my.oschina.net/u/3589495/blog/1858171
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- CentOS 7.3 手动编译安装最新版本Linux Kernel
- centos7.3平台下 利用Cmake3.4.3源码编译安装 QT5.8.0 VTK7.1.1 ITK4.11.1
- Centos7 编译安装 Nginx Mariadb Asp.net Core2 (实测 笔记 Centos 7.3 + Openssl 1.1.0f + Mariadb 10.2.7 + Nginx 1.12.1 + Asp.net. Core 2 )
- Centos 7.3 编译 & 安装 & 测试 facebook faiss
- Centos7.3 安装编译nbd模块
- CentOS7.3系统上编译安装httpd.2.4.25
- 在CentOS中编译安装VIM 7.3
- centos7.3实现基于源码编译安装LAMP的wordpress应用
- centos7.3基于源码编译安装LAMP实现个人博客搭建
- 在CentOS中编译安装VIM 7.3
- Centos7 编译安装 Nginx Mariadb Asp.net Core2 (实测 笔记 Centos 7.3 + Openssl 1.1.0h + Mariadb 10.3.7 + Nginx...
- centos 7.3 安装vmtools,解决无法编译共享文件夹模块
- CentOS 编译安装 Redis (实测 笔记 Centos 7.3 + redis 3.2.8)
- 实验:centos7.3实现基于源码编译安装LAMP的wordpress应用
- CentOs7.3 编译安装 Nginx 1.9.9
- centos7.3上编译安装percona5.7.18
- Centos 7.3 编译 & 安装 & 测试 facebook faiss
- centos7.3 编译安装lamp,利用wordpress实现个人博客搭建
- 在 CentOS 中编译安装 VIM 7.3
- centos7.3实现基于源码编译安装LAMP的wordpress应用