web-dev-qa-db-ja.com

Ubuntuが壊れました!

私はphpとphpMyAdminで問題を抱えていましたが、現在、PHPを手動で削除した後、Apache2がソフトウェアセンターから何かをインストールすると、エラーメッセージが表示されます。

Libapache2-mod-php5をアンインストールしようとしましたが、これは問題の1つと思われるため、次の情報を含む失敗メッセージが表示されます。

installArchives() failed: (Reading database ... 
dpkg: warning: files list file for package 'mysql-client-5.5' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-server-core-5.5' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'Apache2.2-bin' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'php5-cli' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'Apache2.2-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-server-5.5' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'Apache2-utils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libmysqlclient18:i386' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libmysqlclient18:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'php5-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'Apache2-mpm-prefork' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libdbd-mysql-Perl' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libqt4-sql-mysql:i386' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libqt4-sql-mysql:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-client-core-5.5' missing; assuming package has no files currently installed
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 295374 files and directories currently installed.)
Removing libapache2-mod-php5 ...
egrep: /etc/Apache2/mods-enabled/*.load: No such file or directory
Module php5 already disabled
Selecting previously unselected package libapache2-mod-php5filter.
(Reading database ... 
dpkg: warning: files list file for package 'mysql-client-5.5' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-server-core-5.5' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'Apache2.2-bin' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'php5-cli' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'Apache2.2-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-server-5.5' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'Apache2-utils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libmysqlclient18:i386' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libmysqlclient18:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'php5-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'Apache2-mpm-prefork' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libdbd-mysql-Perl' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libqt4-sql-mysql:i386' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libqt4-sql-mysql:AMD64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-client-core-5.5' missing; assuming package has no files currently installed
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 295367 files and directories currently installed.)
Unpacking libapache2-mod-php5filter (from .../libapache2-mod-php5filter_5.4.9-4ubuntu2.1_AMD64.deb) ...
Setting up libapache2-mod-php5filter (5.4.9-4ubuntu2.1) ...
Error: The new file /usr/share/php5/php.ini-production does not exist!
dpkg: error processing libapache2-mod-php5filter (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of php5:
 php5 depends on libapache2-mod-php5 (>= 5.4.9-4ubuntu2.1) | libapache2-mod-php5filter (>= 5.4.9-4ubuntu2.1) | php5-cgi (>= 5.4.9-4ubuntu2.1) | php5-fpm (>= 5.4.9-4ubuntu2.1); however:
  Package libapache2-mod-php5 is not installed.
  Package libapache2-mod-php5filter is not configured yet.
  Package php5-cgi is not installed.
  Package php5-fpm is not installed.

dpkg: error processing php5 (--configure):
 dependency problems - leaving unconfigured
Setting up php5-mysql (5.4.9-4ubuntu2.1) ...No apport report written because MaxReports is reached already


Creating config file /etc/php5/mods-available/mysql.ini with new version
cp: cannot create regular file /etc/php5/mods-available/mysql.ini: No such file or directory
dpkg: error processing php5-mysql (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
 libapache2-mod-php5filter
 php5
 php5-mysql
Error in function: 
Setting up libapache2-mod-php5filter (5.4.9-4ubuntu2.1) ...
Error: The new file /usr/share/php5/php.ini-production does not exist!
dpkg: error processing libapache2-mod-php5filter (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of php5:
 php5 depends on libapache2-mod-php5 (>= 5.4.9-4ubuntu2.1) | libapache2-mod-php5filter (>= 5.4.9-4ubuntu2.1) | php5-cgi (>= 5.4.9-4ubuntu2.1) | php5-fpm (>= 5.4.9-4ubuntu2.1); however:
  Package libapache2-mod-php5 is not installed.
  Package libapache2-mod-php5filter is not configured yet.
  Package php5-cgi is not installed.
  Package php5-fpm is not installed.

dpkg: error processing php5 (--configure):
 dependency problems - leaving unconfigured

失敗したウィンドウをキャンセルすると、libapache2-mod-php5のステータスが未インストールとしてマークされます!

私は現在、各パッケージを調べて、Software Centerからすべてを再度インストールして、このエラーを解決できるかどうかを確認しています。誰かが私が何をしたか、それをどのように修正できるか考えていますか?

Update

エラー報告で行方不明として言及され、すべてがシステムにインストールされているすべてのプログラムを実行しました!

simon@simon-VGN-AR71E:~$ Sudo aptitude remove Apache2 php5 mysql-server
The following packages will be REMOVED:  
  Apache2 mysql-server php5 
The following partially installed packages will be configured:
  libapache2-mod-php5 php5-Gd php5-mysql phpmyadmin 
0 packages upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 168 kB will be freed.
Setting up libapache2-mod-php5 (5.4.9-4ubuntu2.1) ...
Error: The new file /usr/share/php5/php.ini-production does not exist!
dpkg: error processing libapache2-mod-php5 (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports has already been reached
        Errors were encountered while processing:
 libapache2-mod-php5
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up php5-Gd (5.4.9-4ubuntu2.1) ...

Creating config file /etc/php5/mods-available/Gd.ini with new version
cp: cannot create regular file ‘/etc/php5/mods-available/Gd.ini’: No such file or directory
dpkg: error processing php5-Gd (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of phpmyadmin:
 phpmyadmin depends on php5-mysql | php5-mysqli | php5-mysqlnd; however:
  Package php5-mysql is not configured yet.
  Package php5-mysqli is not installed.
  Package php5-mysqlnd is not installed.

dpkg: error processing phpmyadmin (--configure):
 dependency problems - leaving unconfigured
Setting up libapache2-mod-php5 (5.4.9-4ubuntu2.1) ...
Error: The new file /usr/share/php5/php.ini-production does not exist!
dpkg: error processing libapache2-mod-php5 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of php5:
 php5 depends on libapache2-mod-php5 (>= 5.4.9-4ubuntu2.1) | libapache2-mod-php5filter (>= 5.4.9-4ubuntu2.1) | php5-cgi (>= 5.4.9-4ubuntu2.1) | php5-fpm (>= 5.4.9-4ubuntu2.1); however:
  Package libapache2-mod-php5 is not configured yet.
  Package libapache2-mod-php5filter is not installed.
  Package php5-cgi is not installed.
  Package php5-fpm is not installed.

dpkg: error processing php5 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 php5-Gd
 phpmyadmin
 libapache2-mod-php5
 php5

OK、削除しようとしているパッケージがphp5-commonとphp5-cliの2つだけです。 php-cliは削除を拒否し、php5-commonは以下のエラーをスローします。 enter image description here

2
SimplySimon

OK、同じまたは同様の問題を抱えている人がいる場合に備えて、私はそれを修正しました:)

パッケージに到達するまでソフトウェアセンターから各モジュールを削除する長い努力の後に:p​​hp5-commonとphp5-cli、拒否し、空白を指して、優れた力を認め、断固としてインストールされたままにした後、端末に切り替えて入りました

Sudo apt-get remove --purge php5-common php5-cli

これは失敗しました:

dpkg: error processing php5-mysql (--purge):
 subprocess installed pre-removal script returned error exit status 127
Removing php-gettext ...
Removing php5-mcrypt ...
Purging configuration files for php5-mcrypt ...
Removing php5-cli ...
Removing php5-common ...
Purging configuration files for php5-common ...
Errors were encountered while processing:
 php5-Gd
 php5-mysql

私はソフトウェアセンターに戻り、php5-common php5-cliを検索しました。これは、削除する最後の2つのパッケージを購入し、php5-commonの横にあるアンインストールをクリックして、php5-cliを取得しました。 ..ハラー!

8
SimplySimon