2

I have been having problems with php and phpMyAdmin and now, after manually removing php, apache2 a when I install anything from the Software Centre I get a failure message.

I tried to uninstall libapache2-mod-php5 as this seems to be one of the problems: I get a failure message with the following information:

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

When I cancel the failed window, the status of libapache2-mod-php5 is marked as Not Installed!

I am at the present going through each package to see if I can install them all again through the Software Centre to try and kill this error. Has anyone any idea what I have done and how I can fix it?

Update

I have now been through all the programmes which are mentioned in the error report as missing and all are installed on the system!

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, I'm down to just two packages which I am trying to remove, php5-common and php5-cli. php-cli refuses to delete and php5-common throws the error below: enter image description here

4
  • Unfortunately, I get an error with this as well. I'll add the Errors to the bottom of my question in a minute.
    – Simon
    Commented Jun 15, 2013 at 13:06
  • What exactly did you do when performing "after manually removing php, apache2"? I hope you didn't do rm on system files, as that breaks the package management in a way you're seeing now. What exact commands did you run?
    – gertvdijk
    Commented Jun 15, 2013 at 14:32
  • I am embraced to say that I did the unforgivable crime of opening Nautilus with sudo and deleting everything starting with php, mysql and apache! For some reason, the computer continued to work.
    – Simon
    Commented Jun 15, 2013 at 14:48
  • Just a 'sudo apt-get install -f' or if that doesn't work 'sudo apt-get remove --purge apache* && sudo apt-get remove --purge libapache* && sudo apt-get remove --purge php*' would have sufficed I guess? And a reinstall right after that if you wanted it?
    – Dr_Bunsen
    Commented Jul 27, 2013 at 18:32

1 Answer 1

8

OK, Just incase there is anyone out there with the same or a similar problem, I FIXED IT :)

After a long winded effort of deleting each module from the Software Centre until I got to to packages: php5-common and php5-cli, which refused, point blank, to acknowledge my superior powers and stayed resolutely installed, I turned to terminal and entered

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

This failed with:

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

I returned to the Software Centre and searched for php5-common php5-cli which bought up the last two packages to remove and clicked on uninstall next to php5-common and it went taking php5-cli with it... Hurrah!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .