3
sudo apt-get install git-core

Package git-core is a virtual package provided by:
  git 1:2.1.4-2.1+deb8u1 [Not candidate version]

E: Package 'git-core' has no installation candidate

Any ideas as the why I cannot install git?

$ sudo apt-get install git
[sudo] password for chris: 
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-svn git-man git-el

E: Package 'git' has no installation candidate

Here's the sources list in /etc/apt/sources.list

deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free
deb http://archive.raspbian.org/raspbian jessie main contrib non-free
eekfonky
  • 243
  • 2
  • 5
  • 13

3 Answers3

11

Install git rather than git-core.

sudo apt-get install git
Andy Lamb
  • 359
  • 4
  • 8
6

It sounds like your package manager is out of date. Before installing, it's usually wise to update it by running the command:

sudo apt-get update 

Once that's done, you should be able to install it with the command you used before

sudo apt-get install git
Jacobm001
  • 11,904
  • 7
  • 47
  • 58
2

it was problem to clone wiringPi The following error... using MAC

pi@raspberrypi:~ $ git clone git://git.drogon.net/wiringPi
-bash: git: command not found

I used the following method and it worked

pi@raspberrypi:~ $ sudo apt-get install git
pi@raspberrypi:~ $ cd wiringPi
pi@raspberrypi:~/wiringPi $ ./build
Nathan Smith
  • 219
  • 1
  • 4
  • 9
farooq
  • 36
  • 1