版权声明:欢迎转载 https://blog.csdn.net/antony1776/article/details/82801549
1 问题描述
服务器: 龙心/deepin
Linux deepin 3.10.108-deepin+ #3 SMP PREEMPT Tue Jan 23 16:54:44 CST 2018 mips64 GNU/Linux
服务器自带的 openssl 版本:
#> openssl version -a
OpenSSL 1.1.0e 16 Feb 2017
built on: reproducible build, date unspecified
platform: debian-mips64el
系统中使用的 Ruby 版本为 2.0.0,在安装 puma-2.11.1 时报错:
mini_ssl.c: error:
2 原因
openssl 1.1 与 openssl 1.0.2 相比,有较大的变化,导致应用软件在不改变源码的情况下无法同时支持两个版本。
详细情况,参见:
https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes
3 补丁
这种情况下,有三种处理方案:
- 重新安装低版本的 openssl:影响系统其他应用,不可行
- 升级 ruby:需要大规模的修改当前应用,不可行
- 安装兼容性补丁
在编译时出现的问题,主要是因为数据结构和api有较大变化,通过补丁可以解决。
下载补丁: openssl-compat.tar.gz
将 openssl-compat.h 文件放置在待编译的项目中,并在 mini_ssl.c 中添加对该文件的引用。
扫描二维码关注公众号,回复:
3824866 查看本文章
然后可编译成功。