VPS侦探论坛

 找回密码
 注册
查看: 4819|回复: 4

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

[复制链接]
发表于 2016-7-31 13:52:32 | 显示全部楼层 |阅读模式

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

是不是可以在安装1.3的时候直接打包安装gmp和intl?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 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本来默认就有
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2016-7-31 23:04:58 | 显示全部楼层

好的,非常感谢。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 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
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2016-8-3 09:26:13 | 显示全部楼层

回复 4# 的帖子


可能你系统是64位的
执行 ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h  这样后再重新安装试试

军哥运维代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-3-29 17:34 , Processed in 0.027216 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表