can't create a Laravel project because mcrypt extension is missing can't create a Laravel project because mcrypt extension is missing laravel laravel

can't create a Laravel project because mcrypt extension is missing


I got this exact same problem too.You have to find php.ini for php cli and add extension=mcrypt.so

My system is running LAMPP server with preinstalled PHP. So, here's what I do:

Install mcrypt extension

I tried both:

sudo apt-get install mcryptsudo apt-get install php5-mcrypt

Configure php.ini for CLI

Then, edit php.ini located in /opt/lampp/etc/php5/cli/php.ini add extension=mcrypt.so on Dynamic Extension section (anywhere is fine I think). Don't forget to restart your server.

Try using composer to install laravel

Now, you can run whatever method you want to install laravel. I download Laravel 5 manually, unzip, then install using composer install command. I think your command composer create-project laravel/laravel projectname would've run smoothly too.

References:here


mac users install brew and then enter

brew install php56-mcrypt

in terminal

EDIT

if you get any error using above line then try this command

brew install homebrew/php/php56-mcrypt


Please following the step :

  1. cd /etc/php5/cli/conf.d
  2. ln -s ../../mods-available/mcrypt.ini 20-mcrypt.ini

Worked for me.