Sam Geeks
Sam Geeks

Reputation: 401

Unable to install laravel through composer

I have got many solution for this but still cant resolve this issue. When I run the following command:

composer global require "laravel/installer=~1.1"

I got this error:

Changed current directory to C:/Users/Admin/AppData/Roaming/Composer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing symfony/console (v2.6.1)
Downloading: 100%
Downloading: 100%
Downloading: 100%
Failed to download symfony/console from dist: The "https://api.github.com/re
pos/symfony/Console/zipball/ef825fd9f809d275926547c9e57cbf14968793e8" file could
not be downloaded: php_network_getaddresses: getaddrinfo failed: No such host i
s known.
failed to open stream: php_network_getaddresses: getaddrinfo failed: No such hos
t is known.
Now trying to download from source
- Installing symfony/console (v2.6.1)
Cloning ef825fd9f809d275926547c9e57cbf14968793e8



[RuntimeException]
Failed to clone [email protected]:symfony/Console.git, git was not found, chec
k that it is installed and in your PATH env.
'git' is not recognized as an internal or external command,
operable program or batch file.



require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update]
[--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-
packages] [packages1] ... [packagesN]

Am I doing some mistake??

Upvotes: 0

Views: 1015

Answers (2)

Sam Geeks
Sam Geeks

Reputation: 401

The problem was DNS -

I used Google DNS instead of mine internet service provider.

And this trick solves the issue.

Upvotes: 0

Abhay PS
Abhay PS

Reputation: 4175

The error is clearly shown in the output thrown.

[RuntimeException]
Failed to clone [email protected]:symfony/Console.git, git was not found, chec
k that it is installed and in your PATH env.
'git' is not recognized as an internal or external command,

You don't have git installed. Install git on your system and try again.

Upvotes: 2

Related Questions