我正在尝试在Ubuntu 14.04(Trusty Tahr)上安装Git ...当我键入内容时
sudo apt-get install git-all
它说:
E: Unable to locate package git
所以我跑了:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E1DD270288B4E6030699E45FA1715D88E1DF1F24
sudo su -c "echo 'deb http://ppa.launchpad.net/git-core/ppa/ubuntu trusty main' > /etc/apt/sources.list.d/git.list"
sudo apt-get update
sudo apt-get install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
git : Depends: liberror-perl but it is not installable
Recommends: patch but it is not installable
Recommends: rsync but it is not installable
Recommends: ssh-client but it is not installable
E: Unable to correct problems, you have held broken packages.
我该如何修复它,如何使它正常工作?
正如你可以从下面的看到git-all
包装肯定存在于14.04和它不要求PPA:
andrew@corinth:~$ apt-cache policy git-all
git-all:
Installed: (none)
Candidate: 1:1.9.1-1ubuntu0.3
Version table:
1:1.9.1-1ubuntu0.3 0
500 http://au.archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/universe amd64 Packages
1:1.9.1-1 0
500 http://au.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
andrew@corinth:~$
它位于Ubuntu存储库的“ Universe”部分中,因此请确保按照以下说明激活了此操作:
Dash --> Software & Updates --> Ubuntu Software --> Community maintained....
请参见以下屏幕快照,其中鼠标光标指示适当的存储库:
激活“ Universe”并允许重新加载存储库索引后,摆脱PPA的约束,然后简单地运行:
sudo apt-get install git-all
一切都应该很好...
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句