Issue
I'm new to Linux/Debian (squeeze). I'm trying to do an apt-get to install git and receive this error message.
Reading package lists... Done Building dependency tree
Reading state information... Done Package git-core 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 sourceE: Package 'git-core' has no installation candidate
i tried editing my sources.list to the following
# deb cdrom:[Debian GNU/Linux 6.0.5 Squeeze - Official i386 DVD Binary-1 20120512-13:45]/ > squeeze contrib main
# deb cdrom:[Debian GNU/Linux 6.0.5 Squeeze - Official i386 DVD Binary-1 20120512-13:45]/ squeeze contrib main
deb http://security.debian.org/ squeeze/updates main contrib deb-src http://security.debian.org/ squeeze/updates main contrib
deb http://ftp.us.debian.org/debian/ squeeze/updates main contrib deb-src http://ftp.us.debian.org/debian/ squeeze/updates main contrib
deb http://http.us.debian.org/debian squeeze/updates main contrib deb-src http://http.us.debian.org/debian squeeze/updates main contrib
# squeeze-updates, previously known as 'volatile'
# A network mirror was not selected during install. The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
deb http://ftp.debian.org/debian/ squeeze-updates main contrib deb-src http://ftp.debian.org/debian/ squeeze-updates main contrib
as i said i'm very new to this so i don't know what needs to be in the sources.list file. I can't actually install anything right now. i tried installing php as well and got the same error. please help :(
Solution
The git-core
package is obsolete, try installing git
.
EDIT
Furthermore you only have squeeze updates repositories in your sources.list, add at least one regular squeeze repository to get access to all packages, not just updated ones:
deb http://ftp.debian.org/debian/ squeeze main contrib non-free
Afterwards run apt-get update
to update your local package index.
Answered By - scai