Linux下升级openssl到新版本(如CentOS 7中openssl升级到openssl 1.1.1d)后,其实原nginx并没有真正调用新的openssl 1.1.1d。怎么办呢?需对nginx重新编译,但在编译安装过程中有人就无法编译nginx了,遇到如下问题:

[root@centos7 nginx-1.16.1]# make
make -f objs/Makefile
make[1]: 进入目录“/usr/local/src/nginx-1.16.1”
cd /usr/local/openssl
&& if [ -f Makefile ]; then make clean; fi
&& ./config --prefix=/usr/local/openssl/.openssl no-shared no-threads
&& make
&& make install_sw LIBDIR=lib
/bin/sh:行2: ./config: 没有那个文件或目录
make[1]: *** [/usr/local/openssl/.openssl/include/openssl/ssl.h] 错误 127
make[1]: 离开目录“/usr/local/src/nginx-1.16.1”
make: *** [build] 错误 2

怎么办呢?解决办法如下:

进入/usr/local/src/nginx-1.16.1/auto/lib/openssl中
#vim conf


39 CORE_INCS="$CORE_INCS O P E N S S L / . o p e n s s l / i n c l u d e " 40 C O R E D E P S = " OPENSSL/.openssl/include" 40 CORE_DEPS=" OPENSSL/.openssl/include"40COREDEPS="CORE_DEPS O P E N S S L / . o p e n s s l / i n c l u d e / o p e n s s l / s s l . h " 41 C O R E L I B S = " OPENSSL/.openssl/include/openssl/ssl.h" 41 CORE_LIBS=" OPENSSL/.openssl/include/openssl/ssl.h"41CORELIBS="CORE_LIBS O P E N S S L / . o p e n s s l / l i b / l i b s s l . a " 42 C O R E L I B S = " OPENSSL/.openssl/lib/libssl.a" 42 CORE_LIBS=" OPENSSL/.openssl/lib/libssl.a"42CORELIBS="CORE_LIBS O P E N S S L / . o p e n s s l / l i b / l i b c r y p t o . a " … 将 上 述 改 为 : . . . 39 C O R E I N C S = " OPENSSL/.openssl/lib/libcrypto.a" … 将上述改为: ... 39 CORE_INCS=" OPENSSL/.openssl/lib/libcrypto.a"...39COREINCS="CORE_INCS O P E N S S L / i n c l u d e " 40 C O R E D E P S = " OPENSSL/include" 40 CORE_DEPS=" OPENSSL/include"40COREDEPS="CORE_DEPS O P E N S S L / i n c l u d e / o p e n s s l / s s l . h " 41 C O R E L I B S = " OPENSSL/include/openssl/ssl.h" 41 CORE_LIBS=" OPENSSL/include/openssl/ssl.h"41CORELIBS="CORE_LIBS O P E N S S L / l i b / l i b s s l . a " 42 C O R E L I B S = " OPENSSL/lib/libssl.a" 42 CORE_LIBS=" OPENSSL/lib/libssl.a"42CORELIBS="CORE_LIBS $OPENSSL/lib/libcrypto.a"

也即去掉.openssl/就行。
改后:
#make clean
再依次执行./configure … ;make ;make install即重新编译安装即可。

GitHub 加速计划 / ope / openssl
20
1
下载
传输层安全性/安全套接层及其加密库
最近提交(Master分支:3 个月前 )
4f37e543 Recent test additions have increased the number of jobs spawned by the interop runner test which exceeds the maximum allowed. This occurs because the matrix expands to: 7 server elements 6 client elements 7 tests 2 test steps (client interop and server interop Because of how github ci does matrix expansion, this results in 2 * 7 * 7 * 6 = 588 But most of those are invalid because each of the 2 steps only considers either the client or server elements, and so get rerun multiple times Alter the steps to be individual jobs, each with their own reduced matrix to only run each relevant test once, limiting our job count to at most 49 jobs. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Saša Nedvědický <sashan@openssl.org> (Merged from https://github.com/openssl/openssl/pull/26275) 5 天前
c93f4a1e This makes `ikmlen` have a length of at least `Nsk`. Closes #26213 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/26254) 5 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐