How can i get rid of "apache2 : Depends: perl but it is not going to be installed" in ubuntu 14.04 desktop?

This is the error message i have at console when running “sudo apt-get install apache2”

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: perl but it is not going to be installed Depends: apache2-bin (= 2.4.7-1ubuntu4) but it is not going to be installed Depends: apache2-data (= 2.4.7-1ubuntu4) but 2.4.7-1ubuntu4.13 is to be installed E: Unable to correct problems, you have held broken packages.

Output of update $sudo apt-get update Hit trusty InRelease Ign trusty InRelease Hit trusty Release.gpg Hit trusty/main amd64 Packages Hit trusty Release Hit trusty/main i386 Packages Hit trusty/main Translation-en Hit trusty/main amd64 Packages Hit trusty/main i386 Packages Hit trusty/main Translation-en Ign trusty/main Translation-en_IN Reading package lists… Done

I have done recently sudo rm -rf /var/lib/apt/lists/* sudo rm /etc/apt/sources.list

Later i gone to sudo -i software-properties-gtk

and checked the canonical checkbox then,

sudo apt-get update this command i executed.

can any one help me to install apache in my ubuntu!

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

You can try to fix all broken/missing packages by:

  1. sudo apt-get install -f

Also you can try:

  1. sudo apt-get update
  2. sudo apt-get upgrade
  3. sudo apt-get dist-upgrade
  4. sudo apt-get autoremove
  5. sudo apt-get clean

This will update your system, remove unused packages, and clean out local repository of retrieved package files.

After you do it, try installing apache again:

  1. sudo apt-get install -y apache2

Good luck