Eu quebrei o Ubuntu!

2

Eu tenho tido problemas com php e phpMyAdmin e agora, depois de remover manualmente o php, apache2 a quando eu instalo qualquer coisa do Centro de Software eu recebo uma mensagem de falha.

Eu tentei desinstalar o libapache2-mod-php5, pois este parece ser um dos problemas: Eu recebo uma mensagem de falha com as seguintes informações:

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

Quando cancelo a janela com falha, o status de libapache2-mod-php5 é marcado como Não Instalado!

No momento, estou passando por cada pacote para ver se consigo instalá-los novamente por meio do Centro de Software para tentar eliminar esse erro. Alguém tem alguma idéia do que eu fiz e como posso consertá-lo?

Atualizar

Já passei por todos os programas que estão mencionados no relatório de erros como ausentes e todos estão instalados no sistema!

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, estou com apenas dois pacotes que estou tentando remover, php5-common e php5-cli. php-cli se recusa a apagar e php5-common lança o erro abaixo:

    
por SimplySimon 15.06.2013 / 14:40

1 resposta

8

OK, apenas no caso de alguém lá fora com o mesmo ou um problema semelhante, eu corrigi-lo:)

Depois de um longo esforço de excluir cada módulo do Centro de Software até chegar aos pacotes: php5-common e php5-cli, que recusaram, em branco, reconhecer meus poderes superiores e permanecerem resolutamente instalados, recorri terminal e entrou

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

Isso falhou com:

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

Voltei para o Centro de Software e procurei por php5-common php5-cli que comprou os dois últimos pacotes para remover e clicou em desinstalar ao lado do php5-common e ele pegou php5-cli com isso ... Viva!

    
por SimplySimon 15.06.2013 / 16:44