作曲家说没有找到 Git [英] Composer says Git not found

查看:22
本文介绍了作曲家说没有找到 Git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过 "composer install" 安装依赖项时,出现错误:

When installing dependencies via "composer install", I'm getting error:

安装学说/词法分析器 (dev-master bc0e1f0) 克隆bc0e1f0cc285127a38c6c8ea88bc5dba2fd53e94[运行时异常]克隆失败 http://github.com/doctrine/lexer.git, git 不是找到,检查它是否已安装并在您的 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 有效:

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.

这篇关于作曲家说没有找到 Git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆