-1

I am getting the following error when I install Apache2 on my pi.

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-data (= 2.4.10-10+deb8u4) but 2.4.18-1 is to be installed
E: Unable to correct problems, you have held broken packages.

When run sudo apt-get install apache2-data it shows latest package is already installed

  • It installed fine on my 2B ... do you need to apt-get update and apt-get upgrade first ? – IanB Mar 20 '16 at 12:59
  • I did apt-get update and upgrade It did not work... Are u using raspbian? – Arun Nalla Mar 20 '16 at 14:15
  • Yes, I'm using Raspian ... try this "apt-get upgrade -f" to fix it ... and look at this askubuntu.com/questions/611354/error-installing-apache2 – IanB Mar 20 '16 at 15:05
  • Last week I downloaded and installed the "2016-02-26-raspbian-jessie-lite.img" image, installed both apache2 and php5 without the slightest issue on a 2B. If not too difficult I suggest you better start with a freshly downloaded image. – EDP Mar 20 '16 at 16:14
  • Good .. .would you post your own solution ? – IanB Apr 5 '16 at 17:00
0

I'm not sure if held packages are causing the problem, so I'll just post generic advice.

  1. Run sudo apt-get autoremove
  2. Run sudo apt-get update to update your apt database.
  3. Run sudo apt-get upgrade to actually upgrade your programs based on the fresh updates you got from step 2.
  4. Try installing Apache again.
  • Still the same thing... – Arun Nalla Mar 20 '16 at 14:31
  • 1
    @ArunNalla Uninstall apache2-data – Gene Mar 20 '16 at 14:36

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.