0

when attempting to update php to 5.4, i seem to have broken apt-get! everything i try now will give me the below

You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies.
     libapache2-mod-php5 : Depends: apache2-mpm-prefork (> 2.0.52) but it is not going to be installed or
                                    apache2-mpm-itk but it is not going to be installed
                           Depends: apache2.2-common but it is not going to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

running apt-get -f install will give me

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  apache2-mpm-prefork apache2.2-common
Suggested packages:
  apache2-doc apache2-suexec apache2-suexec-custom
The following NEW packages will be installed
  apache2-mpm-prefork apache2.2-common
0 to upgrade, 2 to newly install, 0 to remove and 278 not to upgrade.
3 not fully installed or removed.
Need to get 0 B/229 kB of archives.
After this operation, 876 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 152370 files and directories currently installed.)
Unpacking apache2.2-common (from .../apache2.2-common_2.2.22-1ubuntu1.10_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/apache2.2-common_2.2.22-1ubuntu1.10_amd64.deb (--unpack):
 trying to overwrite '/usr/share/man/man8/apache2.8.gz', which is also in package apache2-bin 2.4.16-4+deb.sury.org~precise+4
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Unpacking apache2-mpm-prefork (from .../apache2-mpm-prefork_2.2.22-1ubuntu1.10_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/apache2-mpm-prefork_2.2.22-1ubuntu1.10_amd64.deb (--unpack):
 trying to overwrite '/usr/sbin/apache2', which is also in package apache2-bin 2.4.16-4+deb.sury.org~precise+4
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/apache2.2-common_2.2.22-1ubuntu1.10_amd64.deb
 /var/cache/apt/archives/apache2-mpm-prefork_2.2.22-1ubuntu1.10_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Nothing ive tried seems to fix this.. can someone help please?

Thanks

osmo
  • 9

1 Answers1

-1

You need to upgrade you kernel

First fix current packages

sudo dpkg --configure -a

Then run updates and upgrades

sudo apt-get update && sudo apt-get upgrade

After installing updates (Some may not because the new package is in the new kernel)

sudo apt-get dist-upgrade

You may want to reboot

DnrDevil
  • 1,488