Reputation: 73
so I have been looking for 12 hours now for a solution to this error I am getting when trying to install Laravel framework for php. I have found many different posts about it but none seems to work. Heres the issue, I go through all the steps to get Laravel on my computer, which is downloading and installing composer to my /usr/local/bin/ directory and then running this command:
Desktop $ composer create-project laravel/laravel learning-laravel
and I get this error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for laravel/framework v5.0.16 -> satisfiable by laravel/framework[v5.0.16].
- laravel/framework v5.0.16 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
I have deleted and reinstalled php, I have ran a script seeing if mcrypt is installed and it runs true, I have tried adding extension=mcrypt.so to the php.ini file (perhaps in the wrong place in the file) but nothing seems to work. I am not working with MAMP I have my own local testing environment.
I am running Mavericks
I have php 5.6.6 installed
I am running apache 2.2.26
Upvotes: 1
Views: 3171
Reputation: 1589
On Ubuntu it's the following two commands:
sudo apt-get install php5-mcrypt
sudo ln -s /etc/php5/mods-available/mcrypt.ini /etc/php5/cli/conf.d/
Upvotes: 1
Reputation: 116
I was having the same problem with mcrypt and the laravel framework running on my mac. I am running php 5.6.6. The mcrypt module seemed to be enabled after viewing phpinfo(). The command line "php -v" command showed that the default version was php 5.4 I think. I added php5 to my bash profile by
1) Get into your user root folder:
cd ~yourUsername
2) Edit your bash profile
sudo nano .bash_profile
2) add the line:
export PATH="/usr/local/php5/bin:$PATH"
This worked for me. Please correct me if I am wrong, but I think for whatever reason the default version of php was being used with incorrect mcrypt configurations. This changed the version of php being used from the command line, and fixed the problem. Now when I type "php -v" the correct version php 5.6.6 show up. Haven't had an issue with mcrypt since.
Upvotes: 3