git - 无法在 ubuntu 虚拟机上安装 git

标签 git ubuntu

关闭。这个问题不符合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/

相关文章:

git - git配置文件可以使用if else语句吗?

windows - 有没有一个图形化工具可以方便的查看git stash内容?

ubuntu - CMake 在 Ubuntu 中找不到 OpenGL

java - OpenJDK 64 位服务器虚拟机警告 :Options -Xverify:none and -noverify were deprecated in JDK 13

Git 部分复制访问控制

git 子模块替换不会分离头

git - 什么是仅状态 Git 存储库?

node.js - curl 命令 - 无法解析 Ubuntu 上的 xn--x-5gn/post

python - 我从哪里开始学习对机器人进行编程?

linux - 组用户名将 root 显示为组但不允许删除