Apt get在Ubuntu 12.04上找不到包'git'
我正试图在ubuntu 12.04上安装git。但是当输入命令时Apt get在Ubuntu 12.04上找不到包'git',git,github,ubuntu-12.04,Git,Github,Ubuntu 12.04,我正试图在ubuntu 12.04上安装git。但是当输入命令时 sudo apt-get install git 我得到以下信息。我已经运行了sudo apt get update Reading package lists... Done Building dependency tree Reading state information... Done Package git is not available, but is referred to by another p
sudo apt-get install git
我得到以下信息。我已经运行了sudo apt get update
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-el
E: Package 'git' has no installation candidate
您必须安装
git-core
sudo apt-get -y install git-core
我尝试了这个,但仍然得到错误:阅读包列表。。。已完成构建依赖关系树以读取状态信息。。。完成包git core不可用,但被另一个包引用。这可能意味着该软件包丢失、已过时或仅可从其他来源获得,但以下软件包将替换它:git gui E:软件包“git core”没有安装候选项确保已通过更新管理器-->设置窗口启用主Ubuntu软件包。如果它在那里并且
sudo apt get update
没有帮助-尝试将git core ppa添加到您的/etc/apt/sources.list
:debhttp://ppa.launchpad.net/git-core/ppa/ubuntu 精密主减速器http://ppa.launchpad.net/git-core/ppa/ubuntu 精密主泵
。不要忘了sudo apt get update
之后。我添加了'deb precise main deb src precise main',但现在我得到'W:GPG error:precise Release:无法验证以下签名,因为公钥不可用:NO_PUBKEY A1715D88E1DF1F24 W:无法获取404未找到无法获取。。。。404 NotFound'如果手动安装不起作用:从源文件中删除这些行,然后运行sudo add apt repository ppa:git core/ppa
。它应该也能拿到钥匙。如果有帮助,请告诉我。添加ppa后,您是否完成了sudo apt get update
?