メモ > サーバ > 各論: トラブル対応例 > SSLを設定しようとすると「undefined symbol: apr_sockaddr_zone_get」のエラーになる
SSLを設定しようとすると「undefined symbol: apr_sockaddr_zone_get」のエラーになる
稼働中のサーバにmod_sslを追加インストールすると、httpdが動作しなくなった。
# yum -y install mod_ssl
# systemctl restart httpd
# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: failed (Result: exit-code) since 木 2024-08-01 14:45:21 JST; 11s ago
Docs: man:httpd.service(8)
Process: 14980 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=127)
Main PID: 14980 (code=exited, status=127)
8月 01 14:45:21 ip-10-1-0-11.ap-northeast-1.compute.internal systemd[1]: Starting The Apache HTTP Server...
8月 01 14:45:21 ip-10-1-0-11.ap-northeast-1.compute.internal httpd[14980]: /usr/sbin/httpd: symbol lookup error: /usr/sbin/httpd: undefined symbol: apr_sockaddr_zone_get
8月 01 14:45:21 ip-10-1-0-11.ap-northeast-1.compute.internal systemd[1]: httpd.service: main process exited, code=exited, status=127/n/a
8月 01 14:45:21 ip-10-1-0-11.ap-northeast-1.compute.internal systemd[1]: Failed to start The Apache HTTP Server.
8月 01 14:45:21 ip-10-1-0-11.ap-northeast-1.compute.internal systemd[1]: Unit httpd.service entered failed state.
8月 01 14:45:21 ip-10-1-0-11.ap-northeast-1.compute.internal systemd[1]: httpd.service failed.
エラーメッセージに「/usr/sbin/httpd: symbol lookup error: /usr/sbin/httpd: undefined symbol: apr_sockaddr_zone_get」とある。
Apacheが必要とするライブラリのバージョンの不整合を示しているらしい。
apache - Starting httpd: symbol lookup error: /usr/sbin/httpd: undefined symbol: apr_procattr_perms_set_register - Stack Overflow
https://stackoverflow.com/questions/65507750/starting-httpd-symbol-lookup-error-usr-sbin-httpd-undef...
以下のとおり、必要な依存関係のパッケージを最新にすることで、mod_sslをインストールできた。
# yum -y update apr apr-util httpd
# yum -y install mod_ssl
# systemctl restart httpd