Apt-get does not find package `git` on Ubuntu 12.04

Shahzeb Khan picture Shahzeb Khan · Apr 23, 2013 · Viewed 25.9k times · Source

I am trying to install git on ubuntu 12.04. But when enter the command

sudo apt-get install git

I get the following message. I have run sudo apt-get update already.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package git is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  git-el

E: Package 'git' has no installation candidate

Answer

Konstantin Rudy picture Konstantin Rudy · Apr 23, 2013

You have to install git-core instead

sudo apt-get -y install git-core