使能WebRTC需要libsrtp库, libsrtp库需要openssl, 所以第一步先安装openssl, 系统自带的版本是1.0.2的, libsrtp需要1.1.1以上版本, 需要使用源码进行编译;
GCC准备
需要安装gcc7以上版本, 并切换到gcc7的编译环境
yum install centos-release-scl
yum install devtoolset-7-gcc*
yum install devtoolset-7-gdb*
scl enable devtoolset-7 bash
使用gcc --version验证下看是否为gcc7了, 接下来进入编译环节
OpenSSL编译安装
使用1.1.1版本的代码, 下载地址:https://github.com/openssl/openssl/archive/refs/heads/OpenSSL_1_1_1-stable.zip
解压, 进入目录, 进行配置
./Configure shared --openssldir=/usr/local/openssl --prefix=/usr/local/openssl
make
make install
一定要配置安装目录, 后面编译libsrtp要用到, 否则编译会很遇到很多麻烦;
libsrtp库编译安装
使用2.4.2版本的代码, 这是咨询

最低0.47元/天 解锁文章
1373

被折叠的 条评论
为什么被折叠?



