Jannat Arora
Jannat Arora

Reputation: 2989

Unable to install git

I ran the following commands on linux mint 12 lisa:

1). sudo rm -rf /var/lib/apt/lists/* -vf
2). sudo apt-get update
3). sudo apt-get install git

I am getting the following error on running 3. That is, installing git:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package git

My /etc/apt/sources.list file contains the following content:

deb http://packages.linuxmint.com/ lisa main upstream import
deb http://archive.ubuntu.com/ubuntu/ oneiric main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ oneiric-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ oneiric-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ oneiric partner
deb http://packages.medibuntu.org/ oneiric free non-free

# deb http://archive.getdeb.net/ubuntu oneiric-getdeb apps
# deb http://archive.getdeb.net/ubuntu oneiric-getdeb games

sudo apt-get upgrade shows the following:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Upvotes: 5

Views: 25739

Answers (4)

I have same problem, but solved by update then upgrade.

sudo apt-get update && sudo apt-get upgrade -y

Upvotes: 0

Senthil Kumar P
Senthil Kumar P

Reputation: 11

I have tried all but this works for me

In Terminal

  1. $ software-properties-gtk
    
  2. In Ubuntu, Software/Download_From_internet, enable all of the check marks

  3. $ sudo apt-get install aptitude
    
  4. $ sudo aptitude install git
    

Upvotes: 0

Sirway
Sirway

Reputation: 105

I have a similar problem and solved it by running the update and upgrade at the same on one command line.

sudo apt-get update && sudo apt-get upgrade -y

after that I normally installed git with :

sudo apt-get install git

Upvotes: 5

Tarun
Tarun

Reputation: 860

You need to install aptitude first.

sudo apt-get install aptitude

then install git using the command

sudo aptitude install git

Upvotes: 4

Related Questions