Package 'git' has no installation candidate

Failed to clone xx.git, git was not found, check that it is installed and in your PATH env

今天查看 Laravel 源码的时候,在文件系统类中看到了 Symfony 的组件 Finder,学习实践一下:

composer require symfony/finder

在 docker 容器中用 composer 安装 Symfony Finder Component 报错:

Package 'git' has no installation candidate_第1张图片

查看原因原来是没有 git 和 zip,于是先安装 git

bash: yum: command not found

好吧,那就用 apt-get install git

E: Package 'git' has no installation candidate

那就更新一下

apt-get update
apt-get upgrade

再次安装 apt-get install git,OK,如果还是不行可以尝试更换一下源。
继续安装 apt-get install zip unzip

附:
symfony/finder 仓库地址
Symfony Finder Component Documentation

你可能感兴趣的:(Package 'git' has no installation candidate)