rpc依赖安装

2023-12-13 12:02:12

依赖:
0、boost:用于实现多线程等;
1、protobuf:用于实现数据的序列化、反序列化,也用于定义和生成rpc数据及接口;
2、libevent:用于实现基于IO多路复用机制的网络事件循环。

其实可以直接用包管理的方式安装,虚拟机上面采用的是源代码编译,一堆错误。而在服务器上直接包管理安装,很方便

sudo apt-get install libboost-all-dev

sudo apt-get install libprotobuf-dev
sudo apt install protobuf-compiler

sudo apt-get install libevent-dev
sudo apt-get install libssl-dev

主要就是protobuf安装容易出问题。

腾讯源

deb https://mirrors.cloud.tencent.com/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.cloud.tencent.com/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.cloud.tencent.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.cloud.tencent.com/ubuntu/ jammy-security main restricted universe multiverse
deb https://mirrors.cloud.tencent.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.cloud.tencent.com/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.cloud.tencent.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src https://mirrors.cloud.tencent.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb https://mirrors.cloud.tencent.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.cloud.tencent.com/ubuntu/ jammy-backports main restricted universe multiverse

文章来源:https://blog.csdn.net/qq_40896190/article/details/134473430
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。