请注意,本文编写于 1369 天前,最后修改于 265 天前,其中某些信息可能已经过时。
解决方法,升级到openssl-1.1.1i版本
查看openssl当前版本:
[root@VM_0_5_centos ~]# rpm -qa | grep openssl
openssl-libs-1.0.2k-16.el7.x86_64
openssl-1.0.2k-16.el7.x86_64
openssl-devel-1.0.2k-16.el7.x86_64
openssl升级至openssl-1.1.1i的安装过程
# 下载指定版本的OpenSSL软件
[root@VM_0_5_centos ~] wget https://www.openssl.org/source/openssl-1.1.1i.tar.gz
# 编译安装
[root@VM_0_5_centos ~] tar -zvxf openssl-1.1.1i.tar.gz
[root@VM_0_5_centos ~] cd openssl-1.1.1i/
[root@VM_0_5_centos ~] ./config shared zlib
[root@VM_0_5_centos ~] make && make install
# 配置
[root@VM_0_5_centos ~] mv /usr/bin/openssl /usr/bin/openssl.bak
[root@VM_0_5_centos ~] mv /usr/include/openssl /usr/include/openssl.bak
[root@VM_0_5_centos ~] find / -name openssl
[root@VM_0_5_centos ~] ln -s /usr/local/bin/openssl /usr/bin/openssl
[root@VM_0_5_centos ~] ln -s /usr/local/include/openssl /usr/include/openssl
[root@VM_0_5_centos ~] echo "/usr/local/lib64/" >> /etc/ld.so.conf
[root@VM_0_5_centos ~] ldconfig
# 验证
[root@VM_0_5_centos ~] openssl version
openssl升级过程中的编译时报错
enc.c:(.text+0xdec): undefined reference to `BIO_f_zlib'
collect2: error: ld returned 1 exit status
make[1]: *** [apps/openssl] Error 1
make[1]: Leaving directory `/usr/local/src/openssl-1.1.1h'
make: *** [all] Error 2
解决方法:
make clean
make && make install # 重新编译安装
1 条评论
安转报错怎么办?