GMP是The GNU MP Bignum Library,是一个开源的数学运算库,它可以用于任意精度的数学运算,包括有符号整数、有理数和浮点数。它本身并没有精度限制,只取决于机器的硬件情况。
先尝试用动态库
http://www.ipython.me/centos/php-gmp-ext.html
yum install gmp-devel
wget http://nchc.dl.sourceforge.net/project/re2c/old/re2c-0.13.5.tar.gz -O “re2c-0.13.5.tar.gz”
tar zxvf re2c-0.13.5.tar.gz
cd re2c-0.13.5
./configure
make && make install
wget https://gmplib.org/download/gmp/archive/gmp-4.1.3.tar.bz2
tar jxvf gmp-4.1.3.tar.bz2
cd gmp-4.1.3
./configure –with-php-config=/opt/php/bin/php-config
make
make install
/opt/php/bin/phpize
recursion limit of 1024 exceeded, use -L
一直出错…
重新编译个php
cd php安装目录
./configure –prefix=/opt/php-5.2.17gmp –with-config-file-path=/opt/php-5.2.17gmp/etc –with-mysql=/opt/mysql –with-mysqli=/opt/mysql/bin/mysql_config \
–with-iconv-dir=/usr/local –with-freetype-dir –with-jpeg-dir –with-png-dir –with-zlib –with-libxml-dir=/usr –disable-rpath \
–enable-discard-path –enable-safe-mode –enable-bcmath –enable-shmop –enable-sysvsem –enable-inline-optimization –with-curl \
–with-curlwrappers –enable-mbregex –enable-fastcgi –enable-fpm –enable-force-cgi-redirect –enable-mbstring –with-mcrypt \
–with-gd –enable-gd-native-ttf –with-openssl –with-mhash –enable-pcntl –enable-sockets –with-xmlrpc –enable-zip –enable-soap \
–enable-xml –enable-zend-multibyte –disable-debug –disable-ipv6 –with-gmp
make ZEND_EXTRA_LIBS=’-liconv’
make install
No Responses (yet)
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.