无法在OS X 10.9 Mavericks中进行phpize或配置扩展 [英] Can't phpize or configure an extension in OS X 10.9 Mavericks
问题描述
我试图在OS X 10.9 Mavericks上构建用于与内置PHP 5.4一起使用的memcached扩展,最初我尝试了pecl install memcached
,但这引发了以下问题.
I am trying to build the memcached extension on OS X 10.9 Mavericks for use with the built in PHP 5.4, initially I tried pecl install memcached
but that threw the following.
checking for zlib location... configure: error: memcached support requires ZLIB. Use --with-zlib-dir=<DIR> to specify the prefix where ZLIB headers and library are located
ERROR: `/private/tmp/pear/install/memcached/configure' failed
因此,我创建了一个tmp目录并执行了pecl download memcached
,解压缩了代码并将其CD到相应的目录.
So I created a tmp directory and executed pecl download memcached
, unzipped the code and cd'd to the appropriate directory.
尝试对其进行phpize返回以下内容:
Trying to phpize it returned the following:
grep: /usr/include/php/main/php.h: No such file or directory
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
前一段时间我brew安装了zlib,并指向./configure进行安装.
./configure --with-zlib-dir=/usr/local/Cellar/zlib/1.2.8
我收到以下错误消息:
I had brew installed zlib a while ago and pointed ./configure at my installation.
./configure --with-zlib-dir=/usr/local/Cellar/zlib/1.2.8
I was greeted with the following error message:
checking for session includes... configure: error: Cannot find php_session.h
所以现在我想知道这里的最佳做法... /usr/include/
根本不存在...这是特立独行的事情吗?我完全不记得在10.8中有这个问题.
So now I'm wondering the best course of action here... /usr/include/
doesn't exist at all... is this a Mavericks thing? I don't remember having this problem in 10.8 at all.
我可以尝试Brew安装php-devel
,但是我认为这不是我所需要的正确版本吗?任何帮助将不胜感激
I could try brew installing php-devel
but I presume that isn't going to be the right version of what I need? Any help would be greatly appreciated here
locate php_session.h
揭示
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/php/ext/session/php_session.h
我应该将其ln -s
到期望的位置,还是可以通过XCode做到这一点?我已经安装了命令行工具...
should I just ln -s
this to the expected location or is there some way to do this via XCode? I have the command line tools installed...
推荐答案
运行xcode-select --install
安装XCode5命令行工具,然后安装sudo pecl install memcache
.你应该很好走.
run xcode-select --install
to install the XCode5 Command Line Tools, then sudo pecl install memcache
. You should be good to go.
这篇关于无法在OS X 10.9 Mavericks中进行phpize或配置扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!