安装 PHP 时出现包配置问题

安装 PHP 时出现包配置问题
$ apt install php
Reading package lists... Done
Building dependency tree       
Reading state information... Done
php is already the newest version (2:7.4+71+ubuntu19.04.1+deb.sury.org+1).
The following packages were automatically installed and are no longer required:
  libapache2-mod-php7.3 php7.3 php7.3-bz2
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
42 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up php7.2-common (7.2.26-1+ubuntu19.04.1+deb.sury.org+1) ...
dpkg: error processing package php7.2-common (--configure):
 installed php7.2-common package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of php7.2-opcache:
 php7.2-opcache depends on php7.2-common (= 7.2.26-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.2-common is not configured yet.

dpkg: error processing package php7.2-opcache (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Setting up php5.6-common (5.6.40-15+ubuntu19.04.1+deb.sury.org+1) ...
dpkg: error processing package php5.6-common (--configure):
 installed php5.6-common package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of php7.2-cli:
 php7.2-cli depends on php7.2-common (= 7.2.26-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.2-common is not configured yet.
 php7.2-cli depends on php7.2-opcache; however:
  Package php7.2-opcache is not configured yet.

dpkg: error processing package php7.2-cli (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Setting up php7.0-common (7.0.33-13+ubuntu19.04.1+deb.sury.org+1) ...
dpkg: error processing package php7.0-common (--configure):
 installed php7.0-common package post-installation script subprocess returned error exit status 10
No apport report written because MaxReports is reached already
                                                              Setting up php7.4-common (7.4.1-1+ubuntu19.04.1+deb.sury.org+1) ...
dpkg: error processing package php7.4-common (--configure):
 installed php7.4-common package post-installation script subprocess returned error exit status 10
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php7.0-cli:
 php7.0-cli depends on php7.0-common (= 7.0.33-13+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.0-common is not configured yet.

dpkg: error processing package php7.0-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.2:
 php7.2 depends on php7.2-common; however:
  Package php7.2-common is not configured yet.

dpkg: error processing package php7.2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5.6-bz2:
 php5.6-bz2 depends on php5.6-common (= 5.6.40-15+ubuntu19.04.1+deb.sury.org+1); however:
  Package php5.6-common is not configured yet.

dpkg: error processing package php5.6-bz2 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
               No apport report written because MaxReports is reached already
                                                                             dpkg: dependency problems prevent configuration of php7.0:
 php7.0 depends on php7.0-common; however:
  Package php7.0-common is not configured yet.

dpkg: error processing package php7.0 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php7.4-readline:
 php7.4-readline depends on php7.4-common (= 7.4.1-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.4-common is not configured yet.

dpkg: error processing package php7.4-readline (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php7.0-readline:
 php7.0-readline depends on php7.0-common (= 7.0.33-13+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.0-common is not configured yet.

dpkg: error processing package php7.0-readline (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php7.4-bz2:
 php7.4-bz2 depends on php7.4-common (= 7.4.1-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.4-common is not configured yet.

dpkg: error processing package php7.4-bz2 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php7.4-cli:
 php7.4-cli depends on php7.4-common (= 7.4.1-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.4-common is not configured yet.
 php7.4-cli depends on php7.4-readline; however:
  Package php7.4-readline is not configured yet.

dpkg: error processing package php7.4-cli (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of libapache2-mod-php7.2:
 libapache2-mod-php7.2 depends on php7.2-cli; however:
  Package php7.2-cli is not configured yet.
 libapache2-mod-php7.2 depends on php7.2-common (= 7.2.26-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.2-common is not configured yet.
 libapache2-mod-php7.2 depends on php7.2-opcache; however:
  Package php7.2-opcache is not configured yet.

dpkg: error processing package libapache2-mod-php7.2 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Setting up unattended-upgrades (1.10ubuntu5.2) ...
dpkg: error processing package unattended-upgrades (--configure):
 installed unattended-upgrades package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of php7.0-json:
 php7.0-json depends on php7.0-common (= 7.0.33-13+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.0-common is not configured yet.

dpkg: error processing package php7.0-json (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
               Setting up php7.3-common (7.3.13-1+ubuntu19.04.1+deb.sury.org+1) ...
dpkg: error processing package php7.3-common (--configure):
 installed php7.3-common package post-installation script subprocess returned error exit status 10
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php7.2-json:
 php7.2-json depends on php7.2-common (= 7.2.26-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.2-common is not configured yet.

dpkg: error processing package php7.2-json (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.4:
 php7.4 depends on php7.4-common; however:
  Package php7.4-common is not configured yet.

dpkg: error processing package php7.4 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.3-xml:
 php7.3-xml depends on php7.3-common (= 7.3.13-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.3-common is not configured yet.

dpkg: error processing package php7.3-xml (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-mysql:
 php7.0-mysql depends on php7.0-No apport report written because MaxReports is reached already
                                                                                              No apport report written because MaxReports is reached already
                                               No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
               No apport report written because MaxReports is reached already
                                                                             No apport report written because MaxReports is reached already
                              No apport report written because MaxReports is reached already
                                                                                            common (= 7.0.33-13+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.0-common is not configured yet.

dpkg: error processing package php7.0-mysql (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.3-cli:
 php7.3-cli depends on php7.3-common (= 7.3.13-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.3-common is not configured yet.

dpkg: error processing package php7.3-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.3-opcache:
 php7.3-opcache depends on php7.3-common (= 7.3.13-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.3-common is not configured yet.

dpkg: error processing package php7.3-opcache (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.4-opcache:
 php7.4-opcache depends on php7.4-common (= 7.4.1-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.4-common is not configured yet.

dpkg: error processing package php7.4-opcache (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-fpm:
 php7.0-fpm depends on php7.0-cli; however:
  Package php7.0-cli is not configured yet.
 php7.0-fpm depends on php7.0-common (= 7.0.33-13+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.0-common is not configured yet.
 php7.0-fpm depends on php7.0-json; however:
  Package php7.0-json is not configured yet.

dpkg: error processing package php7.0-fpm (--configure):
 dependency problems - leaving unconfigured
Setting up openafs-client (1.8.2-1ubuntu0.1) ...
Job for openafs-client.service failed because the control process exited with error code.
See "systemctl status openafs-client.service" and "journalctl -xe" for details.
invoke-rc.d: initscript openafs-client, action "start" failed.
● openafs-client.service - OpenAFS client
   Loaded: loaded (/lib/systemd/system/openafs-client.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2019-12-26 19:51:34 IST; 13ms ago
  Process: 7313 ExecStartPre=/usr/share/openafs/openafs-client-precheck (code=exited, status=0/SUCCESS)
  Process: 7331 ExecStart=/sbin/afsd $AFSD_ARGS (code=exited, status=1/FAILURE)
  Process: 7333 ExecStopPost=/sbin/rmmod $KMOD (code=exited, status=0/SUCCESS)

Dec 26 19:51:34 Vachher systemd[1]: Starting OpenAFS client...
Dec 26 19:51:34 Vachher afsd[7331]: afsd: some file missing or bad in /etc/openafs/
Dec 26 19:51:34 Vachher systemd[1]: openafs-client.service: Control process exited, code=exited, status=1/FAILURE
Dec 26 19:51:34 Vachher systemd[1]: openafs-client.service: Failed with result 'exit-code'.
Dec 26 19:51:34 Vachher systemd[1]: Failed to start OpenAFS client.
dpkg: error processing package openafs-client (--configure):
 installed openafs-client package post-installation script subprocess returned error exit status 1
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php7.2-readline:
 php7.2-readline depends on php7.2-common (= 7.2.26-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.2-common is not configured yet.

dpkg: error processing package php7.2-readline (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php7.0-opcache:
 php7.0-opcache depends on php7.0-common (= 7.0.33-13+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.0-common is not configured yet.

dpkg: error processing package php7.0-opcache (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of libapache2-mod-php7.4:
 libapache2-mod-php7.4 depends on php7.4-cli; however:
  Package php7.4-cli is not configured yet.
 libapache2-mod-php7.4 depends on php7.4-common (= 7.4.1-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.4-common is not configured yet.
 libapache2-mod-php7.4 depends on php7.4-opcache; however:
  Package php7.4-opcache is not configured yet.

dpkg: error processing package libapache2-mod-php7.4 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php:No apport report written because MaxReports is reached already

 php depends on php7.4; however:
  Package php7.4 is not configured yet.

dpkg: error processing package php (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php-pear:
 php-pear depends on php-cli; however:
  Package php-cli is not installed.
  Package php7.4-cli which provides php-cli is not configured yet.
  Package php7.3-cli which provides php-cli is not configured yet.
  Package php7.2-cli which provides php-cli is not configured yet.
  Package php7.0-cli which provides php-cli is not configured yet.

dpkg: error processing package php-pear (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.4-json:
 php7.4-json depends on php7.4-common (= 7.4.1-1+ubuntu19.04.1+deb.sury.org+1); however:
No apport report written because MaxReports is reached already
                                                                Package php7.4-common is not configured yet.

dpkg: error processing package php7.4-json (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.4-xml:No apport report written because MaxReports is reached already

 php7.4-xml depends on php7.4-common (= 7.4.1-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.4-common is not configured yet.

dpkg: error processing package php7.4-xml (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.3-json:No apport report written because MaxReports is reached already

 php7.3-json depends on php7.3-common (= 7.3.13-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.3-common is not configured yet.

dpkg: error processing package php7.3-json (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.3-readline:
 php7.3-readline depends on php7.3-common (= 7.3.13-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.3-common is not configured yet.

No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
               dpkg: error processing package php7.3-readline (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php-bz2:
 php-bz2 depends on php7.4-bz2; however:
  Package php7.4-bz2 is not configured yet.

dpkg: error processing package php-bz2 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php7.3:
 php7.3 depends on php7.3-common; however:
  Package php7.3-common is not configured yet.

dpkg: error processing package php7.3 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of libapache2-mod-php7.3:
 libapache2-mod-php7.3 depends on php7.3-cli; however:
  Package php7.3-cli is not configured yet.
 libapache2-mod-php7.3 depends on php7.3-common (= 7.3.13-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.3-common is not configured yet.
 libapache2-mod-php7.3 depends on php7.3-json; however:
  Package php7.3-json is not configured yet.
 libapache2-mod-php7.3 depends on php7.3-opcache; however:
  Package php7.3-opcache is not configured yet.

dpkg: error processing package libapache2-mod-php7.3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.3-bz2:
 php7.3-bz2 depends on php7.3-common (= 7.3.13-1+ubuntu19.04.1+deb.sury.org+1); however:
  Package php7.3-common is not configured yet.

dpkg: error processing package php7.3-bz2 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
               dpkg: dependency problems prevent configuration of libapache2-mod-php:
 libapache2-mod-php depends on libapache2-mod-php7.4; however:
  Package libapache2-mod-php7.4 is not configured yet.

dpkg: error processing package libapache2-mod-php (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php-xml:
 php-xml depends on php7.4-xml; however:
  Package php7.4-xml is not configured yet.

dpkg: error processing package php-xml (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
               Errors were encountered while processing:
 php7.2-common
 php7.2-opcache
 php5.6-common
 php7.2-cli
 php7.0-common
 php7.4-common
 php7.0-cli
 php7.2
 php5.6-bz2
 php7.0
 php7.4-readline
 php7.0-readline
 php7.4-bz2
 php7.4-cli
 libapache2-mod-php7.2
 unattended-upgrades
 php7.0-json
 php7.3-common
 php7.2-json
 php7.4
 php7.3-xml
 php7.0-mysql
 php7.3-cli
 php7.3-opcache
 php7.4-opcache
 php7.0-fpm
 openafs-client
 php7.2-readline
 php7.0-opcache
 libapache2-mod-php7.4
 php
 php-pear
 php7.4-json
 php7.4-xml
 php7.3-json
 php7.3-readline
 php-bz2
 php7.3
 libapache2-mod-php7.3
 php7.3-bz2
 libapache2-mod-php
 php-xml
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

尝试运行

sudo apt-get -f install
sudo dpkg --configure -a

如果这没有帮助,你的存储库存在一些问题,那么你需要从中删除损坏的存储/etc/apt/sources.list/etc/apt/sources.list.d/

相关内容