web-dev-qa-db-fra.com

J'ai cassé Ubuntu!

J'ai eu des problèmes avec php et phpMyAdmin et maintenant, après avoir supprimé manuellement php, Apache2 lorsque j'installe quoi que ce soit à partir du Centre de logiciels, je reçois un message d'échec.

J'ai essayé de désinstaller libapache2-mod-php5 car cela semble être l'un des problèmes: je reçois un message d'échec avec les informations suivantes:

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

Lorsque j'annule la fenêtre en échec, le statut de libapache2-mod-php5 est marqué comme non installé!

Je suis présentement en train de parcourir chaque paquet pour voir si je peux tous les installer à nouveau via le Centre logiciel pour essayer de supprimer cette erreur. Quelqu'un a-t-il une idée de ce que j'ai fait et de la façon dont je peux le réparer?

Mise à jour

J'ai parcouru tous les programmes mentionnés dans le rapport d'erreur comme étant manquants et tous installés sur le système!

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, je n'ai plus que deux paquets que j'essaie de supprimer, php5-common et php5-cli. php-cli refuse de supprimer et php5-common renvoie l'erreur ci-dessous: enter image description here

2
SimplySimon

OK, juste au cas où quelqu'un aurait le même problème ou un problème similaire, je l'ai corrigé :)

Après un long effort de suppression de chaque module du Centre de logiciels jusqu'à ce que je parvienne aux packages: php5-common et php5-cli, qui ont refusé, à blanc, de reconnaître mes pouvoirs supérieurs et sont restés résolument installés, je me suis tourné vers le terminal et suis entré

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

Cela a échoué avec:

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

Je suis retourné au centre logiciel et ai recherché php5-common php5-cli qui a acheté les deux derniers paquets à supprimer et a cliqué sur désinstaller en regard de php5-common et il est parti avec php5-cli. .. Hourra!

8
SimplySimon