在 ubuntu 14.04 上使用 apt-get 安装 git 失败

Sum*_*Sun 4 apt git 14.04

我想sudo apt-get install git在我的 ubuntu 14.04 上安装 git 后安装 git。日志在这里:

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
Run Code Online (Sandbox Code Playgroud)

然后,按照这个问题,我运行 git-core 而不是 git 但也失败了。顺便说一句我也尝试过apt-get update

之后,我尝试了这个问题的答案。前面两条命令都没有问题,但是输入最后一条命令后,仍然出错。日志在这里:

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).
Run Code Online (Sandbox Code Playgroud)

我最终不知道该怎么办...有人可以告诉我任何想法吗?

小智 5

刚刚遇到这个问题。当我启动软件和更新时,我只检查了: [x] 社区维护的免费和开源软件(宇宙),但没有检查 [ ] Canonical 支持的免费和开源软件(主要)

检查 (main) 允许我安装 git 和其他我遇到问题的软件包(例如 pylint)。