我尝试在 Ubuntu Server 18.04 计算机上执行的任何涉及 SSL 协商的任务都会失败并出现各种错误。例如:
# speedtest-cli
Retrieving speedtest.net configuration...
Cannot retrieve speedtest configuration
ERROR: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)>
# wget http://ftp.au.debian.org/debian/pool/main/s/speedtest-cli/speedtest-cli_2.1.3-2_all.deb
wget: relocation error: wget: symbol ENGINE_load_builtin_engines version OPENSSL_1_1_0 not defined in file libcrypto.so.1.1 with link time reference
我通过更正 OpenSSL 的一些错误链接库来解决 wget 错误:
# ldd `which openssl`
linux-vdso.so.1 (0x00007ffccaebf000)
libssl.so.1.1 => /usr/lib/plexmediaserver/lib/libssl.so.1.1 (0x00007fa859c29000)
libcrypto.so.1.1 => /usr/lib/plexmediaserver/lib/libcrypto.so.1.1 (0x00007fa859546000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa859327000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa858f36000)
libgcompat.so.0 => /usr/lib/plexmediaserver/lib/libgcompat.so.0 (0x00007fa859c0b000)
libc.so => /usr/lib/plexmediaserver/lib/libc.so (0x00007fa859b68000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa859a85000)
# echo $LD_LIBRARY_PATH
/usr/lib/plexmediaserver:/usr/lib/plexmediaserver/lib
# unset LD_LIBRARY_PATH
# wget http://ftp.au.debian.org/debian/pool/main/s/speedtest-cli/speedtest-cli_2.1.3-2_all.deb
--2021-12-01 11:54:51-- http://ftp.au.debian.org/debian/pool/main/s/speedtest-cli/speedtest-cli_2.1.3-2_all.deb
Resolving ftp.au.debian.org (ftp.au.debian.org)... 150.203.164.37, 2001:388:1034:2900::25
Connecting to ftp.au.debian.org (ftp.au.debian.org)|150.203.164.37|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24596 (24K) [application/x-debian-package]
Saving to: ‘speedtest-cli_2.1.3-2_all.deb’
speedtest-cli_2.1.3-2_all.deb 100%[====================================================>] 24.02K --.-KB/s in 0.02s
2021-12-01 11:54:51 (1.12 MB/s) - ‘speedtest-cli_2.1.3-2_all.deb’ saved [24596/24596]
speedtest-cli 程序使用 Python3 脚本,并且我已确保 python3-openssl 是最新的,ca-certificates、openssl 和 speedtest-cli 本身也是最新的(我什至下载了比我的可用版本更新的 .deb)回购,测试)。
我删除了 openssl 软件包,试图重新开始,但这也删除了很多操作系统(包括 ubuntu-server 软件包!)。我重新安装了 openssl 和 ubuntu-server,然后进行了完整的安装apt full-upgrade
,然后重新启动,但错误仍然存在。
我对链接库之类的东西有点不知所措,但是我思考发生的情况是 Plex 媒体服务器在某些 OpenSSL 配置之上发生了爆炸,但我不确定如何准确地查看问题所在,或修复它。任何帮助将不胜感激。
谢谢!