Sword grpc源码编译安装

0.需要科技和狠活
 
1.升级gcc
yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/centos-release-scl-2-3.el7.centos.noarch.rpm
yum -y install devtoolset-9-gcc-c++
source /opt/rh/devtoolset-9/enable

备注:grpc依赖高版本gcc

 
2.安装cmake
wget https://github.com/Kitware/CMake/releases/download/v3.26.3/cmake-3.26.3-linux-x86_64.sh
sh cmake-3.26.3-linux-x86_64.sh

备注:需要手动建立软连接

 
3.安装grpc
git clone --recurse-submodules -b v1.54.0 https://github.com/grpc/grpc
git submodule update --init
mkdir -p cmake/build
pushd cmake/build
cmake ../..
make
make install
popd

备注:grpc的master分支无法编译通过,对于开源项目最好拉取稳定tag进行编译

posted on 2023-05-16 21:06  寒魔影  阅读(41)  评论(0编辑  收藏  举报

导航