TSINGSEE青犀视频使用WebRTC搭建turn服务编译报错openssl路径找不到问题排查

之前的一篇博文中,我们讲了webrtc必备的stun/turn服务,我们尝试了自己搭建stun/turn服务,用的是window安装turn服务,需要安装Cygwin64,最后编译可在window上使用。

但是我们在下载编译安装coturn时,出现报错:“ERROR: OpenSSL Crypto development libraries are not installed properly in required location.”,导致coturn编译不下去。

分析问题:

Cygwin64没有安装openssl和没有指定openssl位置。

1、Cygwin64安装openssl,进行编译./configure && make && make install,github地址:

https://github.com/openssl/openssl;

2、如果安装了openssl,那就没有指定openssl位置,在github下载coturn文件下执行./configure出现错误,打开configure文件,搜索“OpenSSL Crypto”,这样报错的位置已找到,如图:

解决问题:

没有安装openssl请进行安装;

安装openssl那就在控制台执行如下指令:

export SSL_CFLAGS=-I(openssl头文件路径)

export SSL_LIBS=-L(openssl库的路径)

注意:每次重新打开控制台都要执行上面二个指令,不然还会出现openssl找不到的情况。

原文地址:https://www.cnblogs.com/TSINGSEE/p/14870878.html