web-dev-qa-db-ja.com

ubuntu 16.04のphp7は完全には構成されていません。 -21個のdpkg依存関係の問題

14.04から16.04にアップグレードしました。サーバーは稼働していますが、dpkgには21個の依存関係エラーがあり、それらを解決できず、新しいパッケージのインストールと新しいWebサイトの構築ができません。

私はリストを削除しました

Sudo rm -rf /var/lib/apt/lists/*
Sudo apt-get update
Sudo apt-get upgrade

これがエラーの始まりです

$ Sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
21 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.0-common (7.0.11-1+deb.sury.org~xenial+1) ...
dpkg: error processing package php7.0-common (--configure):
 subprocess installed post-installation script returned error exit status 10
dpkg: dependency problems prevent configuration of php7.0-json:
 php7.0-json depends on php7.0-common (= 7.0.11-1+deb.sury.org~xenial+1); however:
  Package php7.0-common is not configured yet.

dpkg: error processing package php7.0-json (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-opcache:
 php7.0-opcache depends on php7.0-common (= 7.0.11-1+deb.sury.org~xenial+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 the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.

dpkg: dependency problems prevent configuration of php7.0-readline:
 php7.0-readline depends on php7.0-common (= 7.0.11-1+deb.sury.org~xenial+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.0-cli:
 php7.0-cli depends on php7.0-common (= 7.0.11-1+deb.sury.org~xenial+1); however:
  Package php7.0-common is not configured yet.
 php7.0-cli depends on php7.0-json; however:
  Package php7.0-json is not configured yet.
 php7.0-cli depends on php7.0-opcache; however:
  Package php7.0-opcache is not configured yet.
 php7.0-cli depends on php7.0-readline; however:
  Package php7.0-readline is not configured yet.

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

dpkg: error processing package libapache2-mod-php7.0 (--configure):
 dependency problems - leaving unconfigured
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.0; however:
  Package libapache2-mod-php7.0 is not configured yet.

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

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

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

dpkg: error processing package php7.0-xml (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of php-xml:
 php-xml depends on php7.0-xml; however:
  Package php7.0-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
dpkg: dependency problems prevent configuration of php-pear:
 php-pear depends on php-cli; however:
  Package php-cli is not installed.
  Package php7.0-cli which provides php-cli is not configured yet.
 php-pear depends on php-xml; however:
  Package php-xml is not configured yet.
  Package php7.0-xml which provides php-xml is not configured yet.

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

dpkg: error processing package php-gettext (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of php7.0-mbstring:
 php7.0-mbstring depends on php7.0-common (= 7.0.11-1+deb.sury.org~xenial+1); however:
  Package php7.0-common is not configured yet.

dpkg: error processing package php7.0-mbstring (--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 php-mbstring:
 php-mbstring depends on php7.0-mbstring; however:
  Package php7.0-mbstring is not configured yet.

dpkg: error processing package php-mbstring (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-mcrypt:
 php7.0-mcrypt depends on php7.0-common (= 7.0.11-1+deb.sury.org~xenial+1); however:
  Package php7.0-common is not configured yet.

dpkg: error processing package php7.0-mcrypt (--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 php-mcrypt:
 php-mcrypt depends on php7.0-mcrypt; however:
  Package php7.0-mcrypt is not configured yet.

dpkg: error processing package php-mcrypt (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-mysql:
 php7.0-mysql depends on php7.0-common (= 7.0.11-1+deb.sury.org~xenial+1); however:
  Package php7.0-common is not configured yet.

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

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

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

dpkg: error processing package pkg-php-tools (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
 php7.0-common
 php7.0-json
 php7.0-opcache
 php7.0-readline
 php7.0-cli
 libapache2-mod-php7.0
 libapache2-mod-php
 php7.0-Gd
 php-Gd
 php7.0-xml
 php-xml
 php-pear
 php-gettext
 php7.0-mbstring
 php-mbstring
 php7.0-mcrypt
 php-mcrypt
 php7.0-mysql
 php-mysql
 php7.0-curl
 pkg-php-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

どんなアイデアでも大歓迎です

2
Greg Smith

これらのエラーは、/ var/lib/apt/lists/*を削除したために表示されます。
Sudo dpkg --configure -aを実行すると、これらのエラーも表示されます。
Sudo apt-get install php7.を実行すると、次のようになります:

「パッケージリストを読み込んでいます...完了依存ツリーの構築
状態情報を読み込んでいます...完了php7.0はすでに最新バージョンです(7.0.19-1 + deb.sury.org〜xenial + 2)。
次のパッケージは自動的にインストールされ、不要になりました:
libmcrypt4 libpcre3-dev libpcre32-3 shtool xml2
「Sudo apt autoremove」を使用してそれらを削除します。 0がアップグレードされ、0が新しくインストールされ、0が削除され、5がアップグレードされていません。 [...] "

Sudo apt autoremove libmcrypt4
と表示されます:
"次のパッケージは削除されます(too)libmcrypt4 libpcre3-dev libpcre32-3 shtool xml2
...そして自動的にいくつかのトリガープロセスが実行され、新しい設定ファイルが作成されます。
もう一度やり直してくださいSudo dpkg --configure -aになり、エラー(なし)が表示されます。
ところで。ダウンロードサーバーを変更します。 リロードで問題がなければ、ターミナルを開いてSudo apt-get updateを実行します。

1
calebAP