Composer说Git找不到 [英] Composer says Git not found
问题描述
通过composer install
安装依赖项时,出现错误:
When installing dependencies via "composer install"
, I'm getting error:
安装doctrine / lexer(dev-master bc0e1f0)克隆
bc0e1f0cc285127a38c6c8ea88bc5dba2fd53e94
[RuntimeException]
无法克隆 http://github.com/doctrine/lexer.git , git is not
found ,check它安装和在您的PATH环境。
'git'不能识别为内部或外部命令,可操作的程序
或批处理文件。
Installing doctrine/lexer (dev-master bc0e1f0) Cloning bc0e1f0cc285127a38c6c8ea88bc5dba2fd53e94 [RuntimeException] Failed to clone http://github.com/doctrine/lexer.git, git was not found, check that it is installed and in your PATH env. 'git' is not recognized as an internal or external command, operable program or batch file.
我不知道该怎么做...我不需要git。
谢谢!
I'm not sure what to do... I don't need git. Thanks!
推荐答案
使用--prefer-dist工作:
Using --prefer-dist worked:
composer install --prefer-dist
力dist部分,ivoba提到;似乎默认开关使用'git'是--prefer-source
to force "dist" part, which ivoba mentioned; it seems default switch which uses 'git' is --prefer-source
这篇关于Composer说Git找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!