Solucionado (ver solução)
Solucionado
(ver solução)
3
respostas

Erro no comando 'laravel new projeto'

Boa noite, pessoal. Já havia criando um projeto no laravel e hoje fui tentar criar um novo projeto e está dando vários erros. abaixo os erros que surgem ao dar o comando laravel new:

C:\Users\Régis>cd Desktop

C:\Users\Régis\Desktop>laravel new diametro

Crafting application... Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Your requirements could not be resolved to an installable set of packages.

Problem 1 - This package requires php >=7.0.0 but your PHP version (5.6.31) does not satisfy that requirement. Problem 2 - Installation request for doctrine/inflector v1.2.0 -> satisfiable by doctrine/inflector[v1.2.0]. - doctrine/inflector v1.2.0 requires php ^7.0 -> your PHP version (5.6.31) does not satisfy that requirement. Problem 3 - Installation request for laravel/framework v5.5.21 -> satisfiable by laravel/framework[v5.5.21]. - laravel/framework v5.5.21 requires php >=7.0 -> your PHP version (5.6.31) does not satisfy that requirement. Problem 4 - Installation request for swiftmailer/swiftmailer v6.0.2 -> satisfiable by swiftmailer/swiftmailer[v6.0.2]. - swiftmailer/swiftmailer v6.0.2 requires php >=7.0.0 -> your PHP version (5.6.31) does not satisfy that requirement. Problem 5 - Installation request for phpdocumentor/reflection-docblock 4.1.1 -> satisfiable by phpdocumentor/reflection-docblock[4.1.1]. - phpdocumentor/reflection-docblock 4.1.1 requires php ^7.0 -> your PHP version (5.6.31) does not satisfy that requirement. Problem 6 - Installation request for phpunit/php-code-coverage 5.2.3 -> satisfiable by phpunit/php-code-coverage[5.2.3]. - phpunit/php-code-coverage 5.2.3 requires php ^7.0 -> your PHP version (5.6.31) does not satisfy that requirement. Problem 7 - Installation request for phpunit/php-token-stream 2.0.1 -> satisfiable by phpunit/php-token-stream[2.0.1]. - phpunit/php-token-stream 2.0.1 requires php ^7.0 -> your PHP version (5.6.31) does not satisfy that requirement. Problem 8 - Installation request for phpunit/phpunit 6.4.4 -> satisfiable by phpunit/phpunit[6.4.4]. - phpunit/phpunit 6.4.4 requires php ^7.0 -> your PHP version (5.6.31) does not satisfy that requirement. Problem 9 - Installation request for phpunit/phpunit-mock-objects 4.0.4 -> satisfiable by phpunit/phpunit-mock-objects[4.0.4]. - phpunit/phpunit-mock-objects 4.0.4 requires php ^7.0 -> your PHP version (5.6.31) does not satisfy that requirement. Problem 10 - Installation request for sebastian/comparator 2.1.0 -> satisfiable by sebastian/comparator[2.1.0]. - sebastian/comparator 2.1.0 requires php ^7.0 -> your PHP version (5.6.31) does not satisfy that requirement. Problem 11 - Installation request for sebastian/diff 2.0.1 -> satisfiable by sebastian/diff[2.0.1]. - sebastian/diff 2.0.1 requires php ^7.0 -> your PHP version (5.6.31) does not satisfy that requirement. Problem 12 - Installation request for sebastian/environment 3.1.0 -> satisfiable by sebastian/environment[3.1.0]. - sebastian/environment 3.1.0 requires php ^7.0 -> your PHP version (5.6.31) does not satisfy that requirement. Problem 13 - Installation request for sebastian/exporter 3.1.0 -> satisfiable by sebastian/exporter[3.1.0]. - sebastian/exporter 3.1.0 requires php ^7.0 -> your PHP version (5.6.31) does not satisfy that requirement. Problem 14 - Installation request for sebastian/global-state 2.0.0 -> satisfiable by sebastian/global-state[2.0.0]. - sebastian/global-state 2.0.0 requires php ^7.0 -> your PHP version (5.6.31) does not satisfy that requirement. Problem 15 - Installation request for sebastian/object-enumerator 3.0.3 -> satisfiable by sebastian/object-enumerator[3.0.3]. - sebastian/object-enumerator 3.0.3 requires php ^7.0 -> your PHP version (5.6.31) does not satisfy that requirement. Problem 16 - Installation request for sebastian/object-reflector 1.1.1 -> satisfiable by sebastian/object-reflector[1.1.1]. - sebastian/object-reflector 1.1.1 requires php ^7.0 -> your PHP version (5.6.31) does not satisfy that requirement. Problem 17 - Installation request for sebastian/recursion-context 3.0.0 -> satisfiable by sebastian/recursion-context[3.0.0]. - sebastian/recursion-context 3.0.0 requires php ^7.0 -> your PHP version (5.6.31) does not satisfy that requirement. Problem 18 - Installation request for theseer/tokenizer 1.1.0 -> satisfiable by theseer/tokenizer[1.1.0]. - theseer/tokenizer 1.1.0 requires php ^7.0 -> your PHP version (5.6.31) does not satisfy that requirement. Problem 19 - laravel/framework v5.5.21 requires php >=7.0 -> your PHP version (5.6.31) does not satisfy that requirement. - laravel/tinker v1.0.2 requires illuminate/console ~5.1 -> satisfiable by laravel/framework[v5.5.21]. Grato.

3 respostas

Primeiramente seu servidor ou composer está utilizando a versão 5.6 do PHP e o laravel requer o PHP 7.

Se o problema for o servidor, instale o servidor web como a versão do PHP 7 e tente novamente.

Se o problema for o composer, desinstale e instale apontando para o php.exe referente ao php 7 instalado.

Tente novamente.

Verifica a versão do seu PHP , por que logo nas primeiras linhas ele fala que a versão 5.6 não satisfaz os requisistos , em seguida ve as permissões do composer e do próprio laravel

solução!

Ainda não fiz o curso de laravel aqui pelo alura, fiz pelo laracasts, e nas versões 5.4+ o PHP 7 é pre-requisito, acredito que em versões anterioes o php 5.6 fosse suportado.