-1

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 http://ppa.launchpad.net trusty InRelease
Ign http://in.archive.ubuntu.com trusty InRelease
Hit http://in.archive.ubuntu.com trusty Release.gpg
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://in.archive.ubuntu.com trusty Release
Hit http://ppa.launchpad.net trusty/main i386 Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://in.archive.ubuntu.com trusty/main amd64 Packages
Hit http://in.archive.ubuntu.com trusty/main i386 Packages
Hit http://in.archive.ubuntu.com trusty/main Translation-en
Ign http://in.archive.ubuntu.com 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!

Jaccs
  • 1,052
  • 3
  • 12
  • 33
  • 1
    I don't think your question is in the correct place. The Ubuntu forums might work or maybe http://serverfault.com/ or http://superuser.com/? Also why not just sudo apt-get install perl ? – Dan Walmsley Sep 21 '16 at 05:10
  • thanks for that. still getting error when i run sudo apt-get install perl perl : Depends: perl-base (= 5.18.2-2ubuntu1) but 5.18.2-2ubuntu1.1 is to be installed Anyway i moved this question to serverfault.com there people might be aware. – Jaccs Sep 21 '16 at 05:22
  • You could get the package from here and install it manually: http://packages.ubuntu.com/precise/apache2 – Chankey Pathak Sep 21 '16 at 05:44
  • What are you trying to do? Why did you delete sources.list? That's likely a source of your problem – ysth Sep 21 '16 at 16:19
  • Nothing would help me... one of the solution provided by external source led me to did that. – Jaccs Sep 22 '16 at 11:48

1 Answers1

1

try using sudo apt-get -f install to force the install.

You may need to go back and forth between sudo apt-get update and sudo apt-get -f install to slowly get all the packages installed.

Also try cleaning the cache and configuring any packages that are not configured yet. sudo apt-get clean sudo dpkg --configure -a

Hopefully that will get you where you need to be.

FrankRalphBob
  • 434
  • 4
  • 14