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 報錯:

Installation failed

查看原因原來是沒有 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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM