11月
03
2025年ももう11月ですが、ようやく自鯖(この blog が置いてある VPS)を Ubuntu 22.04 TLS から Ubuntu 24.04 TLS にアップグレードしました。また blog が止まりました。
# 実際には一旦手元の VM 上でアップグレードリハーサルをやってその時に遭遇した現象
今回は前回とは症状が少し違っていて、Apache 自体が起動しません。
root@vps-upgrade-test:/etc/apache2# systemctl status apache2.service | cat (中略) Nov 02 15:22:03 vps-upgrade-test apachectl[1553]: apache2: Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/mods-enabled/php8.1.load: Cannot load /usr/lib/apache2/modules/libphp8.1.so into server: /usr/lib/apache2/modules/libphp8.1.so: cannot open shared object file: No such file or directory (以下略) root@vps-upgrade-test:/etc/apache2#
また PHP のモジュールの設定ファイルをうまく更新できてません。まったく…
前回は mods-enabled ディレクトリにのみ古い PHP のモジュールの設定ファイルへのリンクが残っていて設定ファイルの実体はなかったのですが、今回は mods-available ディレクトリに古い PHP のモジュールの設定ファイルが残っていました。
ともあれ修正。
root@vps-upgrade-test:/etc/apache2# a2dismod php8.1 Module php8.1 disabled. To activate the new configuration, you need to run: systemctl restart apache2 root@vps-upgrade-test:/etc/apache2# rm mods-available/php8.1.* root@vps-upgrade-test:/etc/apache2# a2enmod php8.3 Considering dependency mpm_prefork for php8.3: Considering conflict mpm_event for mpm_prefork: Considering conflict mpm_worker for mpm_prefork: Module mpm_prefork already enabled Considering conflict php5 for php8.3: Enabling module php8.3. To activate the new configuration, you need to run: systemctl restart apache2 root@vps-upgrade-test:/etc/apache2# systemctl start apache2
まあほぼ既知の現象でよかったです。
no comment untill now