Ubuntu: Apache2 installation failed on Ubuntu 12.04



Question:

Hi i am trying to install Apache2 server on my Ubuntu 12.04, but when i enter this command

sudo apt-get install apache2  

i am getting this error -

Reading package lists... Done  Building dependency tree         Reading state information... Done  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 to resolve the situation:

The following packages have unmet dependencies:

 apache2 : Depends: apache2-bin (= 2.4.12-1+deb.sury.org~precise+5) but it is not going to be installed  E: Unable to correct problems, you have held broken packages.  

How do i fix this problem??


Solution:1

Run this command:

sudo apt-get update    sudo apt-get install --reinstall apache2 apache2-bin   


Solution:2

aptitude works for me.. install aptitude package first

sudo apt-get install aptitude

once aptitude is ready install apache2

sudo aptitude install apache2  


Solution:3

The only solution that seems to work fine is downloading aptitude, pressing "n" for the first suggestion, followed by a "y". Trying to see dpkg packages to see if any apache2 library was on hold and trying to change it did not work, neither did the steps to purge and reinstall work.


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