Ubuntu: Can't install libapache2-mod-php5


When I try to install libapache2-mod-php5, I get an error:

Some packages could not be installed. This may mean that you have  requested an impossible situation or if you are using the unstable  distribution that some required packages have not yet been created  or been moved out of Incoming.  The following information may help resolve the situation:    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  E: Unable to correct problems, you have held broken packages.  

I have tried apt-get clean, update and upgrade, as well as -f install, and no change.

Is there a way to fix this, or is there an easy way to manually install the php plugin?


How did you install apache - From the repository or from Apache's website, or compiled?

Normally, it would install apache2-mpm-prefork for the traditional non-threaded model; apache2-mpm-itk is the multiuser MPM. Both can be installed from the repository, and the prefork is normally installed with the apache2 metapackage. It seems like reinstalling apache2 should do it, or simply installing the missing package directly, although if you're missing one, you may be missing others.

Manually installing the php plugin it is not a solution - it depends on one of these packages, so would not be expected to run correctly without it. That's what a dependency is.


Are you on on a system that has moved to php7? check out this answer if yes: Can't install php5 on Ubuntu 16.04

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »