I am attempting to get composer running on my Mac and using MAMP. I installed composer using
sudo curl -sS https://getcomposer.org/installer | phpmamp
So, in .bash_profile, I've added the following alias
alias phpmamp='/Applications/MAMP/bin/php/php5.5.14/bin/php'
After installing, I also moved composer.phar to /usr/local/bin/composer
Now I try to run composer and I get the following error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php53-mcrypt/5.3.26/mcrypt.so' - dlopen(/usr/local/Cellar/php53-mcrypt/5.3.26/mcrypt.so, 9): Library not loaded: /usr/local/lib/libmcrypt.4.4.8.dylib
Referenced from: /usr/local/Cellar/php53-mcrypt/5.3.26/mcrypt.so
Reason: image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php53-mcrypt/5.3.26/mcrypt.so' - dlopen(/usr/local/Cellar/php53-mcrypt/5.3.26/mcrypt.so, 9): Library not loaded: /usr/local/lib/libmcrypt.4.4.8.dylib
Referenced from: /usr/local/Cellar/php53-mcrypt/5.3.26/mcrypt.so
Reason: image not found in Unknown on line 0
??+?%
Here's my php version info:
PHP 5.5.14 (cli) (built: Jul 25 2014 17:02:08)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
I've tried adding the following to my bash_profile with no luck/difference:
PATH=/Applications/MAMP/bin/php/php5.5.17/bin:$PATH
You're trying to load PHP 5.3 libraries into a PHP 5.5 installation. You need to install a PHP 5.5 version of mcrypt. If you're using Homebrew to manage your PHP install (which you should), brew install php55-mcrypt
will do the trick.