2

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??

  • I found how to fix. while installing apache2 add apache2-bin library also. follow this command to fix sudo apt-get install --reinstall apache2 apache2-bin – Karthik Jul 6 '15 at 9:23
1

Run this command:

sudo apt-get update

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

aptitude works for me.. install aptitude package first

sudo apt-get install aptitude

once aptitude is ready install apache2

sudo aptitude install apache2
  • Why would he need to use aptitude instead of apt/apt-get? – dufte Jun 8 '16 at 9:44
0

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.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.