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 

3 Answers 3

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 
11

Install git rather than git-core.

sudo apt-get install git 
0
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 
3
  • I always do, still doesn't work Commented Feb 21, 2016 at 15:53
  • @Jacomb001 : I have done these, and it goes through an update process. and go through install and it tells me I have the latest version, but I am still on 2.1, and 2.12 is out.. Commented Apr 12, 2017 at 12:26
  • @WORMSS: the package managers are not always on the latest revision. It takes time for them to check updates for compatibility and then compile them for all the various architectures. Commented Apr 12, 2017 at 17:16

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.