我正在尝试安装 mcrypt 以在我的本地机器开发环境中使用。我需要这个来安装 Magento。
我使用此答案安装 mcrypt,但收到以下错误:
$ 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
尝试按照不允许的建议覆盖链接。
$ 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
在此命令前面加上“sudo”并不能解决此问题,因为这也是不允许的。
运行php -m
不会将 mcrypt 显示为已安装的模块,并且还会引发以下错误:
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
这一切似乎都与我无法链接这个事实有关,但我似乎无法解决这个问题。有没有人遇到过这个?感谢您的任何帮助,您可以提供。