关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。
我们不允许在 Stack Overflow 上提出有关通用计算硬件和软件的问题。您可以编辑问题,使其成为 on-topic对于堆栈溢出。
3年前关闭。
Improve this question
在我的虚拟机上安装 ubuntu 之后,我立即尝试安装 git。但是我得到了未满足的依赖项错误,所以我尝试了:
sudo add-apt-repository ppa:git-core/ppa
然后我得到了错误:
add-apt-repository: command not found
我试过了:
sudo apt-get install software-properties-common
但是说那已经是最新版本了。
我的步骤:
sudo apt-get install git
The following packages have unmet dependencies.
git: Depends: liberror-perl but it is not installable
E: Unable to correct problems, you have held broken packages.
sudo add-apt-repository ppa:git-core/ppa
sudo: add-apt-repository: command not found
sudo apt-get install software-properties-common python-software-properties
software-properties-common is already the newest version.
python-software-properties is already the newest version.
最佳答案
要在 Ubuntu 上安装 git,您应该运行:
sudo apt-get update
sudo apt-get install git-core
然后通过键入检查安装工作
git --version
关于git - 无法在 ubuntu 虚拟机上安装 git,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51988667/