• grpc c++部署


    属实踩了一堆坑,记录下。
    老的博客好多都问题多多,按照这篇博客基本可以搞定

    记录下一些很坑的地方:

    首先cmake的安装按照官方的即可,不用按一些博客里讲的那么麻烦

    sudo apt install -y cmake
    
    • 1

    但是后面官方文档 q u i c k s t a r t quick start quickstart里面的这个 g i t c l o n e git clone gitclone语句可能会由于网络问题导致失败,而且无法 r e t r y retry retry,所以得

    git clone https://github.com/grpc/grpc.git
    
    • 1

    然后再更新子模块

    git submodule update --init
    
    • 1

    注意更新子模块这一步可能失败(网络问题),但是如果失败,你可以一直尝试直到成功(没有 f a i l fail fail出现),如果网络真的无法支持,可以选择更改配置文件,到 g i t e e gitee gitee获取,我给出的链接的那篇博客就是这样做的,可以参考。
    p r o t o b u f protobuf protobuf一定在 t h i r d p a r t y thirdparty thirdparty里面去配置安装,别自己安装了,可能版本不匹配。
    如果你没有mkdir -p cmake/build然后去在 b u i l d build build里面 m a k e make make然后 m a k e    i n s t a l l make \; install makeinstall的话,很有可能出现Installing via 'make' is no longer supported. Use cmake or bazel instead.的错误,建议还是按照上面的博客走避免这个错误情况。
    如果 m a k e make make的时候还是报错,说一些东西识别不了,很可能是你的库没有装完全,可以参考这篇博客对依赖进行安装,看看是否能解决
    特别的如果遇到fatal error: zconf.h: No such file or directory #include "zconf.h"可以通过sudo apt-get install libz-dev进行解决
    如果还是不行,可能只能自行 g o o g l e google google解决了

  • 相关阅读:
    什么是零日攻击?
    Visual Studio 2022 编译新版 Mission Planner 地面站
    Java系统预定义线程池
    自动化信息收集工具 水泽 使用教程
    Mybatis-SQL分析组件
    使用html2canva截图生成图片
    力扣(LeetCode)301. 删除无效的括号(2022.10.29)
    spring事务失效场景
    Apache SeaTunnel Web 功能正式发布!
    Lua 调试库( debug )
  • 原文地址:https://blog.csdn.net/ergedathouder/article/details/127977834