【发布时间】:2013-04-05 11:13:49
【问题描述】:
我正在尝试安装 mcrypt 以在我的本地机器开发环境中使用。我需要这个来安装 Magento。
我用这个回答install 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
这一切似乎都与我无法链接这个事实有关,但我似乎无法解决这个问题。有没有人遇到过这个?感谢您提供的任何帮助。
【问题讨论】:
-
您使用的是哪些 linux 发行版,您是否尝试以
root用户身份安装? -
@R.S —
brew命令表明他正在使用homebrew,这表明他正在使用 OS X。 -
是的,我使用的是 OS X 山狮。抱歉,我没有从一开始就提到这一点。
标签: php magento terminal mcrypt