katanabbs 发表于 2016-7-31 13:52:32

新手求教。如何支持php gmp?

新手求教。如何支持php gmp?1.3的在ubuntu下我试了好几天没有安装成功。哪个大哥可以教一下呢。
我是linux新手,尽可能详细点,万分感谢。

是不是可以在安装1.3的时候直接打包安装gmp和intl?

licess 发表于 2016-7-31 16:49:52

所有php模块的安装参考这个https://www.vpser.net/manage/lnmp-php-install-ext.html
你安装不成功也要贴个 错误信息

gmp安装应该需要提前自己安装好依赖包,ubuntu下应该是 apt-get install libgmp-dev

安装lnmp的话可以自己修改lnmp.conf 在 PHP_Modules_Options='' 单引号中加入 --with-gmp 但已有必须要安装前安装好所需的依赖包

intl本来默认就有

katanabbs 发表于 2016-7-31 23:04:58

好的,非常感谢。

katanabbs 发表于 2016-8-2 21:18:27

回复 2# 的帖子

你好,请您帮我看一下这怎么解决。
我有安装了libgmp-dev,
root@192:/soft/lnmp1.3-full/src/php-5.4.45/ext/gmp# ./configure --with-php-config=/usr/local/php/bin/php-config

checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local/php
checking for PHP includes... -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/php/lib/php/extensions/no-debug-non-zts-20100525
checking for PHP installed headers prefix... /usr/local/php/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking for GNU MP support... yes, shared
configure: error: Unable to locate gmp.h

licess 发表于 2016-8-3 09:26:13

回复 4# 的帖子

可能你系统是64位的
执行 ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h这样后再重新安装试试
页: [1]
查看完整版本: 新手求教。如何支持php gmp?