简体   繁体   English

如何在Mac OS X 10.6.6上启用php-gmp? (没有macports)

[英]How to enable php-gmp on Mac OS X 10.6.6? (no macports)

I want to enable my php-gmp and I don't want to use macports because I use homebrew. 我想启用我的php-gmp,因为我使用自制软件,所以我不想使用macports。

First I 首先,我

brew install gmp brew install gmp

and I got gmp 5.0.1 我得到了gmp 5.0.1

Then I downloaded the PHP source 5.3.6, then I go to 然后我下载了PHP源代码5.3.6,然后转到

source/ext/gmp 来源/分机/ gmp

I did 我做了

phpize phpize

and then 然后

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' ./configure --with-php-config=/Developer/SDKs/MacOSX10.6.sdk/usr/bin/php-config; 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'./configure --with-php-config = / Developer / SDKs / MacOSX10.6.sdk / usr / bin / php-config; make -j6;sudo make install 进行-j6; sudo进行安装

And it gave me this message: 它给了我这个信息:

checking for GNU MP support... yes, shared checking for __gmp_randinit_lc_2exp_size in -lgmp... no checking for gmp_randinit_lc_2exp_size in -lgmp... no configure: error: GNU MP Library version 4.1.2 or greater required. 检查GNU MP支持...是,共享检查-lgmp中的__gmp_randinit_lc_2exp_size ...否检查-lgmp中的gmp_randinit_lc_2exp_size ...否配置:错误:需要GNU MP库版本4.1.2或更高版本。 make: * No targets specified and no makefile found. make: *未指定目标,也未找到任何makefile。 Stop. 停止。

Any idea how to enable php-gmp without macports on Mac OSX 10.6.6? 任何想法如何在Mac OSX 10.6.6上不使用macports的情况下启用php-gmp? Thx 谢谢

如果您安装了homebrew-php tap ,现在可以执行以下操作:

$ brew install php55 --with-gmp

Php-gmp is incompatible with GMP 5.0.1. Php-gmp与GMP 5.0.1不兼容。 This is a known bug, reported on bugs.php.net over a year ago. 这是一个已知的错误,一年多以前在bugs.php.net上报告。 Check the comments on the bug to see if there's a workaround that works for you. 检查该错误的注释,以查看是否有适合您的解决方法。 If not, and if homebrew doesn't have a GMP 4.x package you can install instead, I think you're stuck building a copy of GMP 4.x manually. 如果没有,并且如果自制软件没有GMP 4.x软件包,则可以安装,我想您是在手动构建GMP 4.x副本。 :-( :-(

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM