Ubuntu x86-64和aarch64升级OpenSSL

确认openssl版本受影响
安装编译所需工具
源码安装惯例,生产环境建议make test
备份旧openssl并为新安装的openssl做链接
装载配置,确认新版本号

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
openssl version
apt install make gcc perl -y
wget https://www.openssl.org/source/openssl-1.1.1l.tar.gz --no-check-certificate
tar xvf openssl-1.1.1l.tar.gz && cd openssl-1.1.1l
./config
make
make test
whereis openssl
mv /usr/bin/openssl /usr/bin/openssl.old
# mv /usr/include/openssl /usr/include/openssl.old
make install
ln -s /usr/local/bin/openssl /usr/bin/openssl
# ln -s /usr/local/include/openssl /usr/include/openssl
ldconfig
openssl version

aarch64的服务器在安装后报错
symbol lookup error: openssl: undefined symbol: EVP_mdc2, version OPENSSL_1_1_0

修正动态链接库目录

1
2
3
4
5
6
7
8
9
10
11
readelf -d /usr/local/bin/openssl 
ldd /usr/local/bin/openssl

cat /etc/ld.so.conf.d/libc.conf

echo "/lib/aarch64-linux-gnu/" >> /etc/ld.so.conf.d/libc.conf

cp /usr/local/lib/lib* /lib/aarch64-linux-gnu/

ldconfig
openssl version

REF

图片已过时

Comments

You forgot to set the shortname for Disqus. Please set it in _config.yml.