0

I'm trying to execute this command(below)

composer create-project laravel/laravel TestApp --prefer-dist

Here is the error I am getting:

Mcrypt PHP extension required.
Script php artisan clear-compiled handling the post-install-cmd event returned with an error



[RuntimeException]  
Error Output:       



create-project [-s|--stability="..."] [--prefer-source] [--prefer-dist] [--repository-     url="..."] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs] [--no-install] [package] [directory] [version]

I've cheked:

php -v

PHP 5.4.24

sudo composer diagnose

Checking platform settings: OK Checking git settings: OK Checking http connectivity: OK Checking disk free space: OK Checking composer version: OK

any idea??

Thanks

gon250
  • 3,405
  • 6
  • 44
  • 75

2 Answers2

1

You're missing the mcrypt extension for PHP, which is a requirement for Laravel. Depending on what system you are, or just search for mcrypt extension.

edit: just saw your osx tag, then the first link should cover it.

Community
  • 1
  • 1
Simon Wicki
  • 4,029
  • 4
  • 22
  • 25
  • you are right. The problem is it's using a wrong php version. I have followed the steps the guy says in the post but it´s not working. I set ".bash_profile" and I have added export PATH=/Applications/MAMP/bin/php/php5.5.10/bin:$PATH but when I type which PHP doesn't print the path I've added and also I still getting the same problem. any idea?? – gon250 Mar 27 '14 at 21:02
  • didn't you say, your `php -v` outputs 5.4.24 instead of 5.5.10? – Simon Wicki Mar 27 '14 at 22:09
  • I installed 5.5.10. I followed the steps of the post you sent me and it's working ok.. so thanks you :) – gon250 Mar 27 '14 at 22:22
0

On linux you can do:

sudo apt-get install php5-mcrypt
sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available
sudo php5enmod mcrypt
sudo service apache2 restart

if you are on a mac could try:

http://topicdesk.com/downloads/mcrypt/mcrypt-download

scrubmx
  • 2,486
  • 19
  • 24