从 9.16.1 升级到 9.16.15 后,Bind9(命名)无法启动

从 9.16.1 升级到 9.16.15 后,Bind9(命名)无法启动

我在 Ubuntu 21.10 上使用bind9。在旧版本下bind9,一切正常:

$ named -v
BIND 9.16.1-Ubuntu (Stable Release) <id:[censored]>

然而,当我升级bind9到新版本时9.16.15-Ubuntu,我开始遇到问题:

$ sudo /etc/init.d/bind9 status
× named.service - BIND Domain Name Server
     Loaded: loaded (/lib/systemd/system/named.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2021-10-20 11:03:30 CEST; 5min ago
       Docs: man:named(8)
    Process: 576399 ExecStart=/usr/sbin/named $OPTIONS (code=exited, status=127)
        CPU: 15ms

Okt 20 11:03:30 [censored] systemd[1]: named.service: Scheduled restart job, restart counter is at 5.
Okt 20 11:03:30 [censored] systemd[1]: Stopped BIND Domain Name Server.
Okt 20 11:03:30 [censored] systemd[1]: named.service: Start request repeated too quickly.
Okt 20 11:03:30 [censored] systemd[1]: named.service: Failed with result 'exit-code'.
Okt 20 11:03:30 [censored] systemd[1]: Failed to start BIND Domain Name Server.

运行 plainnamed会出现以下错误:

$ named
named: symbol lookup error: /usr/lib/x86_64-linux-gnu/libdns-9.16.15-Ubuntu.so: undefined symbol: EVP_PKEY_new_raw_public_key

这个错误在 Google 上没有搜索结果,但是符号的名称似乎与 OpenSSL 有关,因此我附上了我的版本:

$ openssl version
OpenSSL 1.1.1l  24 Aug 2021 (Library: OpenSSL 1.1.1a  20 Nov 2018)

我该如何修复该问题?

答案1

事实证明,问题在于 OpenSSL 链接到了不一致的库。我安装了正确的库,但尚未删除错误的库。

删除这些库并ldconfig随后运行解决了我的问题:

sudo rm /lib/x86_64-linux-gnu/libssl.so.1.1
sudo rm /lib/x86_64-linux-gnu/libcrypto.so.1.1
sudo ldconfig

感谢@waltinator 和@Tilman 的评论此主题

相关内容