Failed upgrade of PHP on Ubunutu 12.04, error: Sub-process /usr/bin/dpkg returned an error code (1)

I just tried to upgrade my version of PHP on Ubuntu 12.04 and now I have messed it up. First I did this:

sudo add-apt-repository ppa:ondrej/php5-oldstable

Then I did this:

sudo apt-get update

Then finally I did this:

sudo apt-get install php5

And now I am getting an error message about Sub-process /usr/bin/dpkg returned an error code (1)

What have I done wrong? How can I fix this problem? Thanks.

Here are the errors received:

Do you want to continue [Y/n]? Y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Setting up libapache2-mod-php5 (5.4.28-1+deb.sury.org~precise+1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing libapache2-mod-php5 (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Setting up php5-cli (5.4.28-1+deb.sury.org~precise+1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing php5-cli (--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-curl:
 php5-curl depends on phpapi-20100525+lfs; however:
  Package phpapi-20100525+lfs is not installed.
  Package libapache2-mod-php5 which provides phpapi-20100525+lfs is not configured yet.
  Package php5-cli which provides phpapi-20100525+lfs is not configured yet.
dpkg: error processing php5-curl (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php5-gd:
 php5-gd depends on phpapi-20100525+lfs; however:
  Package phpapi-20100525+lfs is not installed.
  Package libapache2-mod-php5 which provides phpapi-20100525+lfs is not configured yet.
  Package php5-cli which provides phpapi-20100525+lfs is not configured yet.
dpkg: error processing php5-gd (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php5-mcrypt:
 php5-mcrypt depends on phpapi-20100525+lfs; however:
  Package phpapi-20100525+lfs is not installed.
  Package libapache2-mod-php5 which provides phpapi-20100525+lfs is not configured yet.
  Package php5-cli which provides phpapi-20100525+lfs is not configured yet.
dpkg: error processing php5-mcrypt (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php5-mysql:
 php5-mysql depends on phpapi-20100525+lfs; however:
  Package phpapi-20100525+lfs is not installed.
  Package libapache2-mod-php5 which provides phpapi-20100525+lfs is not configured yet.
  Package php5-cli which provides phpapi-20100525+lfs is not configured yet.
dpkg: error processing php5-mysql (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php5:
 php5 depends on libapache2-mod-php5 (>= 5.4.28-1+deb.sury.org~precise+1) | libapache2-mod-php5filter (>= 5.4.28-1+deb.sury.org~precise+1) | php5-cgi (>= 5.4.28-1+deb.sury.org~precise+1) | php5-fpm (>= 5.4.28-1+deb.sury.org~precise+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
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 libapache2-mod-php5
 php5-cli
 php5-curl
 php5-gd
 php5-mcrypt
 php5-mysql
 php5
E: Sub-process /usr/bin/dpkg returned an error code (1)

Related:


Leave a Reply