通过 DPKG 升级 PHP8.3 时遇到问题

通过 DPKG 升级 PHP8.3 时遇到问题

我在安装 php8.3-fpm 时遇到了一个奇怪的依赖问题ondrej/php回购

每次我想通过 APT 升级我的 Ubuntu Server22.04LTS 上的 php8.3 安装时,都会收到来自 dpkg 的配置错误。

Setting up php8.3-cli (8.3.6-1+ubuntu22.04.1+deb.sury.org+1) ...
ucfr: Attempt from package php8.3-cli  to take /etc/php/8.3/fpm/php.ini away from package php8.3-fpm
ucfr: Aborting.
dpkg: error processing package php8.3-cli (--configure):
 installed php8.3-cli package post-installation script subprocess returned error exit status 4
dpkg: dependency problems prevent configuration of php8.3-fpm:
 php8.3-fpm depends on php8.3-cli; however:
  Package php8.3-cli is not configured yet.

dpkg: error processing package php8.3-fpm (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 php8.3-cli
 php8.3-fpm
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

我尝试运行:

sudo dpkg --configure -a

但这会导致同样的错误

我目前的解决方法是彻底清除 php8.3 安装,然后重新安装。但这真的很烦人,因为每次我都必须在配置文件中重新配置 php。

还有其他永久修复吗?或者有其他比 ondrej/php 更稳定的存储库吗?

相关内容