直接执行命令:
apt install git安装过程中如果出现了以下错误,需要更新一下 apt 包列表
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
E: Package 'git' has no installation candidate
root@iZ8vbh829ac9d7go2fq5otZ:~# git -V
Command 'git' not found, but can be installed with:
apt install git更新 apt 包列表:
apt-get update -y
apt-get upgrade -y更新之后再 执行 apt install git 安装
最后执行 git --version 检查 git 是否安装成功
首发自:ubuntu 18.04 上安装git - 小鑫の随笔
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。