我正在尝试使用pecl_http和memcache设置我的机器,在这两种情况下,我都会遇到类似的错误.这是在MAC OS X 10.7.3(狮子)上,我也安装了XCODE.我还在运行这些命令之前安装了Zend Server社区版,并设置了CFLAGS =' - arch i386 -arch x86_64'环境变量.所以请帮助我做我需要做的事情
bash-3.2# **sudo pecl install pecl_http-1.7.1**
downloading pecl_http-1.7.1.tgz ...
Starting to download pecl_http-1.7.1.tgz (174,098 bytes)
.....................................done: 174,098 bytes
71 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
ERROR: `phpize' failed
Run Code Online (Sandbox Code Playgroud) 我已经成功安装了mcryptvia,homebrew但我很难找到将mcrypt.so其作为扩展包含在其中的路径php.ini.
mcrypt安装在/usr/local/Cellar/mcrypt/2.5.8.树:
-- AUTHORS
|-- ChangeLog
|-- INSTALL_RECEIPT.json
|-- NEWS
|-- README
|-- TODO
|-- bin
| `-- libmcrypt-config
|-- include
| |-- mcrypt.h
| `-- mutils
| `-- mcrypt.h
|-- lib
| |-- libmcrypt.4.4.8.dylib
| |-- libmcrypt.4.dylib -> libmcrypt.4.4.8.dylib
| `-- libmcrypt.dylib -> libmcrypt.4.4.8.dylib
`-- share
|-- aclocal
| `-- libmcrypt.m4
`-- man
`-- man3
`-- mcrypt.3
Run Code Online (Sandbox Code Playgroud)
我想包括mcrypt.h在php.ini:
extension="/usr/local/Cellar/mcrypt/2.5.8/include/mcrypt.h"
Run Code Online (Sandbox Code Playgroud)
然后重新启动apache.但它不起作用.
当我在终端中运行php时,我得到:
PHP Warning: PHP Startup: …Run Code Online (Sandbox Code Playgroud) 我一直收到这个错误
需要Mcrypt PHP扩展
在我运行之后在底部composer update:

由于我使用的是Mac,我尝试过运行:
brew search mcrypt
brew install php56-mcrypt
我仍然得到相同的错误消息.
我正在尝试使用Homebrew在Mountain Lion上的PHP 5.4.11中安装mcrypt支持,我遇到了无法解决的问题.
我已经在我的Mac上手动安装了PHP 5.4.11.先前已经使用Homebrew安装了mcrypt.
当我加载phpMyAdmin时,它会告诉我mcrypt没有启用.
所以,搜索谷歌,我意识到,不知何故,mcrypt没有被加载,因为当我加载我的phpinfo文件时没有引用它.
@DavidYell在回答另一个问题时,在OSX Mountain Lion上安装PHP的mcrypt扩展提示了以下修复
brew install mcrypt php53-mcrypt
以下是我发出命令的结果:
$ brew install mcrypt php54-mcrypt
Error: mcrypt-2.5.8 already installed
==> Installing php54-mcrypt dependency: autoconf
==> Downloading http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/autoconf/2.69
==> make install
/usr/local/Cellar/autoconf/2.69: 69 files, 2.0M, built in 29 seconds
==> Installing php54-mcrypt dependency: freetype
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/freetype-2.4.10.mountainlion.bottle.tar.gz
######################################################################## 100.0%
==> Pouring freetype-2.4.10.mountainlion.bottle.tar.gz
/usr/local/Cellar/freetype/2.4.10: 56 files, 2.5M
==> Installing php54-mcrypt dependency: gettext
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/gettext-0.18.2.mountain_lion.bottle.tar.gz
######################################################################## 100.0%
==> Pouring gettext-0.18.2.mountain_lion.bottle.tar.gz …Run Code Online (Sandbox Code Playgroud)