4

I want to install git, after using sudo apt-get install git to install git on my ubuntu 14.04. Logs are here:

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-man

E: Package 'git' has no installation candidate

Then, following this question, i run git-core instead of git but also fail. BTW I have also tried apt-get update.

After this, I tried the answer in this question. There's nothing wrong with the previous two command, but after enter the last command, error still happens. Log is here:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 aptitude:i386 : Depends: libapt-pkg4.12:i386 (>= 0.8.16~exp12ubuntu6) but it is not installable
                 Depends: libboost-iostreams1.46.1:i386 (>= 1.46.1-1) but it is not installable
                 Depends: libc6:i386 (>= 2.4) but it is not installable
                 Depends: libcwidget3:i386 but it is not installable
                 Depends: libept1.4.12:i386 but it is not installable
                 Depends: libgcc1:i386 (>= 1:4.1.1) but it is not installable
                 Depends: libncursesw5:i386 (>= 5.6+20070908) but it is not installable
                 Depends: libsigc++-2.0-0c2a:i386 (>= 2.0.2) but it is not installable
                 Depends: libsqlite3-0:i386 (>= 3.6.5) but it is not installable
                 Depends: libstdc++6:i386 (>= 4.6) but it is not installable
                 Depends: libtinfo5:i386 but it is not installable
                 Depends: libxapian22:i386 but it is not installable
                 Recommends: apt-xapian-index:i386 but it is not installable
                 Recommends: libparse-debianchangelog-perl:i386 but it is not installable
 git : Depends: git-man (> 1:2.7.1) but 1:1.9.1-1ubuntu0.2 is to be installed
 ppa-purge : Depends: aptitude but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

I finaaly have no idea what to do with this then... Can anyone show me any idea?

3 Answers3

5

Just ran into this problem. When I launched Software & Updates I had only: [x] Community-maintained free and open source (universe) checked, but not [ ] Canonical-supported free and opensource software (main)

Checking (main) allowed me to install git and other packages I was having trouble with (pylint for example).

arcolop
  • 51
3

I finally find the solution to first open the Software & Updates of Ubuntu system. select the "Canonical-supported free...", then select all options in the Other Software page.

Then run sudo apt-get install -f to fix those dependencies that are missing.

Then run sudo apt-get update && apt-get upgrade and my apt-get can be use again.

Wish this could help when you face similar problem like me.

1

I found the solution. First open the Software & Updates of Ubuntu system. Select the "Canonical-supported free...", then select all options in the Other Software page.

Then run

sudo apt-get install -f

to fix those dependencies that are missing.

Then run

sudo apt-get update 
sudo apt-get upgrade 

and my apt-get can be used again.