无法让 pecl memcached 在 mac os x Snow leopard 上为 XAMPP 构建 32 位版本
我尝试在 Mac 上为本地开发环境安装 PHP pecl memcache 扩展,但它只会安装 64 位版本,该版本与 XAMPP 的 32 位 php 不兼容。
这些是我采取的步骤:
cd /tmp/
c-66-31-208-39:/tmp casey$ pecl download memcache-2.2.5
c-66-31-208-39:/tmp casey$ tar xzf memcache-2.2.5.tgz
c-66-31-208-39:/tmp casey$ cd memcache-2.5.5
c-66-31-208-39:memcache-2.2.5 casey$ sudo /Applications/XAMPP/xamppfiles/bin/phpize-5.3.1 MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS='-O3 -fno-common -arch i386 -arch x86_64' LDFLAGS='-O3 -arch i386 -arch x86_64' CXXFLAGS='-O3 -fno-common -arch i386 -arch x86_64'
c-66-31-208-39:memcache-2.2.5 casey$ ./configure --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config-5.3.1
c-66-31-208-39:memcache-2.2.5 casey$ make
c-66-31-208-39:memcache-2.2.5 casey$ sudo make install
在所有这些成功完成后,我运行:
c-66-31-208-39:memcache-2.2.5 casey$ file /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/memcache.so
/Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/memcache.so: Mach-O 64-bit bundle x86_64
这是 64 位版本?我不是从源代码构建软件的专家,谁能告诉我我做错了什么?
I'm attempting to install the PHP pecl memcache extension on my Mac for my local development environment, and it will only install the 64 bit version which is not compatible with 32 bit php from XAMPP.
These are the steps I've taken:
cd /tmp/
c-66-31-208-39:/tmp casey$ pecl download memcache-2.2.5
c-66-31-208-39:/tmp casey$ tar xzf memcache-2.2.5.tgz
c-66-31-208-39:/tmp casey$ cd memcache-2.5.5
c-66-31-208-39:memcache-2.2.5 casey$ sudo /Applications/XAMPP/xamppfiles/bin/phpize-5.3.1 MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS='-O3 -fno-common -arch i386 -arch x86_64' LDFLAGS='-O3 -arch i386 -arch x86_64' CXXFLAGS='-O3 -fno-common -arch i386 -arch x86_64'
c-66-31-208-39:memcache-2.2.5 casey$ ./configure --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config-5.3.1
c-66-31-208-39:memcache-2.2.5 casey$ make
c-66-31-208-39:memcache-2.2.5 casey$ sudo make install
After all of that completes successfully, I run:
c-66-31-208-39:memcache-2.2.5 casey$ file /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/memcache.so
/Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/memcache.so: Mach-O 64-bit bundle x86_64
And it's the 64 bit version? I'm not an expert on building software from source, can anyone tell me what I'm doing incorrectly?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
configure
行也需要CFLAGS
。例如:
您可能还需要上面几行中的
-O3
和-fno-common
。configure
line needsCFLAGS
as well.something like:
You might want the
-O3
and-fno-common
from the lines above in there as well.