【发布时间】:2021-03-13 03:21:20
【问题描述】:
操作系统:macOS 11(大苏尔)
自制:2.5.12
梨版本:1.10.12
我刚刚使用 homebrew (brew install php@7.4) 将我的 mac 上的 php 从 php7.1 升级到 php7.4。
然后,当我尝试安装 mcrypt 扩展时,我得到了错误:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
ERROR: `/private/tmp/pear/install/mcrypt/configure --with-php-config=/usr/local/homebrew/opt/php@7.4/bin/php-config --with-mcrypt' failed
这是我所做的:
- brew isntall mcrypt
- 安装 pecl
- sudo pecl install mcrypt -- 错误出现在这里。
我尝试了什么:
-
找到 mcrypt.h 并将文件手动放到几个位置(基于 php-config),不起作用。
-
清理了 brew 并重新安装/重新链接 mcrypt(libmcrypt),不起作用。
-
删除了旧 brew 版本的遗留 mcrypt 文件。
【问题讨论】:
-
这个成功了吗?遇到同样的问题。
-
我放弃了用自制软件安装php7.4。终于用 MAMP Pro 获得了我的开发环境。