3
respostas

Erro ao criar projeto Laravel no MacOS

Pessoal,

Ao criar o projeto estou tendo o seguinte erro:

composer create-project laravel/laravel estoque "5.0"
Installing laravel/laravel (v5.0.0)
  - Installing laravel/laravel (v5.0.0): Loading from cache
Created project in estoque
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/framework v5.0.9 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.8 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.7 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.6 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.5 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.4 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.35 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.34 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.33 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.32 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.31 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.3 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.29 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.28 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.27 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.26 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.25 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.24 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.23 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.22 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.21 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.20 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.2 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.19 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.18 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.17 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.16 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.15 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.14 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.13 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.12 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.11 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.10 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.1 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework v5.0.0 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - laravel/framework 5.0.30 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - Installation request for laravel/framework 5.0.* -> satisfiable by laravel/framework[5.0.30, v5.0.0, v5.0.1, v5.0.10, v5.0.11, v5.0.12, v5.0.13, v5.0.14, v5.0.15, v5.0.16, v5.0.17, v5.0.18, v5.0.19, v5.0.2, v5.0.20, v5.0.21, v5.0.22, v5.0.23, v5.0.24, v5.0.25, v5.0.26, v5.0.27, v5.0.28, v5.0.29, v5.0.3, v5.0.31, v5.0.32, v5.0.33, v5.0.34, v5.0.35, v5.0.4, v5.0.5, v5.0.6, v5.0.7, v5.0.8, v5.0.9].
3 respostas

Oi Paulo, tudo bom?

O erro está nos dizendo que estamos sem a extensão mcrypt!

Tenta instalar essa extensão, pelo terminal:

brew install php56-mcrypt

Uma outra solução possivel é ir lá no seu arquivo php.ini e adicionar a linha:

extension=mcrypt.so

Qualquer dificuldade, compartilha com a gente!

Abraço e bons estudos =)

André, quando tento instalar o brew retorna que já está instalado

MacBook-Pro-de-Henrique:Desktop usuariobr$ brew install php56-mcrypt
Warning: homebrew/php/php56-mcrypt-5.6.30_4 already installed

Da uma olhada no seu arquivo php.ini, ve se a extensão está habilitada:

extension=mcrypt.so

As vezes ela pode estar comentada:

;extension=mcrypt.so

Nesse caso, é só retirar o ponto e virgula da frente =)