I am trying to install mcrypt for use on my local machines dev environment. I need to this to install Magento.
I used this answer to install mcrypt, but get the following error:
$ brew link mcrypt
Linking /usr/local/Cellar/mcrypt/2.5.8... Warning: Could not link mcrypt. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/mcrypt/2.5.8/include/mutils/mcrypt.h
Target /usr/local/include/mutils/mcrypt.h already exists. You may need to delete it.
To force the link and delete this file, do:
brew link --overwrite formula_name
To list all files that would be deleted:
brew link --overwrite --dry-run formula_name
Trying to overwrite the links as suggested in not allowed.
$ brew link --overwrite mcrypt
Linking /usr/local/Cellar/mcrypt/2.5.8... Warning: Could not link mcrypt. Unlinking...
Error: Permission denied - /usr/local/include/mutils/mcrypt.h
Prepending this command with "sudo" does not fix this issue as that is also not allowed.
Running php -m
doesn't show mcrypt as an installed module, and also throws the following error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20100525/mcrypt.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20100525/mcrypt.so, 9): image not found in Unknown on line 0
This all seems to be related to the fact that I cannot link this, I just can't seem to solve this issue though. Has anyone encountered this? Thanks for any help you can provide.
Thomas, from what I can see above it looks like you're trying to use Homebrew to install the mcrypt
package to your system, but mcrypt
has already been installed by another package management system (or may ship by default in your version of OS X — I don't keep up on these things)
Since mcrypt is already installed on your *nix system, what you need to do is install the PHP extension for mycrypt, or install a version of PHP that support mcrypt out of the box.
My usual approch to this is to use the hp-osx.liip.ch package (which seems to be the successor to Marc Liyanage's old entropy.ch
package). This installs a stand alone version of PHP as a binary, and should have the libraries you need to run Magento.