0

I'm trying to install Git using the following commands:

sudo apt-get install git-core

and

sudo apt-get install git

Both don't seem to work. It seems that it can't find some packages. This is the result for both commands: enter image description here

My sources list:

# deb http://ftp.de.debian.org/debian jessie main

deb http://ftp.de.debian.org/debian jessie main non-free contrib
deb-src http://ftp.de.debian.org/debian jessie main non-free contrib

deb http://old-releases.debian.org/ jessie/updates main contrib non-free
deb-src http://old-releases.debian.org/ jessie/updates main contrib non-free

# jessie-updates, previously known as 'volatile'
deb http://ftp.de.debian.org/debian jessie-updates main contrib non-free
deb-src http://ftp.de.debian.org/debian jessie-updates main contrib non-free

deb http://ftp.debian.org/debian jessie-backports main

deb http://mirrors.digitalocean.com/debian jessie main contrib non-free
deb-src http://mirrors.digitalocean.com/debian jessie main contrib non-free

# jessie-updates, previously known as 'volatile'
deb http://mirrors.digitalocean.com/debian jessie-updates main contrib non-free
deb-src http://mirrors.digitalocean.com/debian jessie-updates main contrib non-free

deb http://packages.dotdeb.org jessie all
deb-src http://packages.dotdeb.org jessie all

deb http://ftp.debian.org/debian stretch-backports main
deb-src http://ftp.debian.org/debian stretch-backports main

My Linux version: Debian GNU/Linux 8 (jessie)

What are the correct package urls for Git?

  • 1
    Hello and welcome to the U&L stack exchange site! Please review How to Ask to get information on how to best post to this site. To get to your post, you should avoid posting pictures of text. Pictures can be hard to read. Text is easier to read in different screen formats, can be copied and pasted, as well as is search engine addressable, making it easier for people to reach this post who may have a similar issue. Could you please edit your post to be text instead? Thank you! – Mr Shunz Apr 23 at 11:50
  • I put text first in there instead of the picture, but when I tried to post the question, it returned the error "This looks like spam". So I replaced the text with the picture and I could post my question. – Displee Apr 23 at 12:38
3

Remove all lines in your sources.list and add the following lines

deb http://ftp.us.debian.org/debian/ jessie main contrib non-free deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free

and don't forget apt-get update

  • Thanks. Worked. – Displee Apr 23 at 11:19
0

The jessie-backports repository doesn't exist any more and had packages that were meant for stretch. As the current distribution is now stretch, you have two options:

  • disable jessie-backports, run apt-get update and get the git packages from jessie (apt-get install git), stretch (currently not in your sources.list) or stretch-backports (apt-get install -t stretch-backports git)
  • upgrade to stretch

Not the answer you're looking for? Browse other questions tagged or ask your own question.