C++ GRPC以及pybind11开发环境
1、使用下面命令安装pybind11
conda install -c conda-forge pybind11
apt install pybind11-dev
2、安装grpc
export MY_INSTALL_DIR=$HOME/.local
mkdir -p $MY_INSTALL_DIR
export PATH="$MY_INSTALL_DIR/bin:$PATH"
3、安装cmake
#wget -q -O cmake-linux.sh https://github.com/Kitware/CMake/releases/download/v3.30.3/cmake-3.30.3-linux-x86_64.sh
#sh cmake-linux.sh -- --skip-license --prefix=$MY_INSTALL_DIR
#rm cmake-linux.sh
4、安装必须的依赖
apt install -y build-essential autoconf libtool pkg-config
5、build 并安装grpc
$ git clone --recurse-submodules -b v1.66.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc
$ cd grpc
$ mkdir -p cmake/build
$ pushd cmake/build
$ cmake -DgRPC_INSTALL=ON \
-DgRPC_BUILD_TESTS=OFF \
-DCMAKE_INSTALL_PREFIX=$MY_INSTALL_DIR \
../..
$ make -j 4
$ make install
$ popd
6、参考examples 里面cpp目录下的CMakeLists.txt,开发程序