Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Composer says Git not found

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

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.

I'm not sure what to do... I don't need git. Thanks!

like image 430
my2c Avatar asked Jul 22 '13 16:07

my2c


People also ask

How do I install Git?

To install Git, navigate to your command prompt shell and run the following command: sudo dnf install git-all . Once the command output has completed, you can verify the installation by typing: git version .

How do I update composer Phar?

update / u# In order to get the latest versions of the dependencies and to update the composer. lock file, you should use the update command. This command is also aliased as upgrade as it does the same as upgrade does if you are thinking of apt-get or similar package managers.


Video Answer


1 Answers

Using --prefer-dist worked:

composer install --prefer-dist 

to force dist part, which @ivoba mentioned; it seems default switch which uses git is --prefer-source.

like image 60
my2c Avatar answered Sep 23 '22 10:09

my2c