Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mcrypt PHP extension required on Mac OS X

Tags:

I keep getting this error

Mcrypt PHP extension required

at the bottom after I run a composer update :

enter image description here

Since I am using Mac, I have tried running :

brew search mcrypt brew install php56-mcrypt

I still get the same error message.

like image 859
code-8 Avatar asked Mar 29 '15 13:03

code-8


2 Answers

Steps

I solved this by running the following commands

brew update
brew upgrade
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew install php54-mcrypt
php --version // To Test your php 
sudo composer update

Result

No more Mcrypt warning !!

Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
Generating optimized class loader
like image 184
code-8 Avatar answered Oct 18 '22 19:10

code-8


After update brew:

brew update
brew upgrade
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php

If you have installed php5.6 (or higher), you can use the following command to find out what versions are available in brew:

$ brew search mcrypt
homebrew/php/php53-mcrypt     homebrew/php/php55-mcrypt         homebrew/php/php70-mcrypt     mcrypt
homebrew/php/php54-mcrypt     homebrew/php/php56-mcrypt     homebrew/php/php71-mcrypt

In my case, I am using php7.0:

$ brew install php70-mcrypt
like image 24
CharlieJade Avatar answered Oct 18 '22 17:10

CharlieJade