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.