lnmp1.1 安装geoip失败,报错
大家好, 我安装了lnmp,然后升级php到5.5.19版本,安装geoip,我下载了geoip-1.1.0,执行:./configure --with-php-config=/usr/local/php/bin/php-config --with-geoip
结果报错:
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-20121212
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 geoip support... yes, shared
./configure: line 5330: syntax error near unexpected token `fi'
./configure: line 5330: `fi'
我尝试换其他的geoip版本(1.0.7),也是报错。
不知道有人成功安装过吗?谢谢 看错误好像代码上好像有问题,没结束 我现在用pecl来安装geoip,也安装成功了,但是很奇怪,我pecl安装的时候,提示我:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
但我执行/usr/local/php/bin/phpize ,结果却是:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212
所以我现在php.ini 里,加上
extension=geoip.so 后,重启php,提示我因为版本不一致,模块加载失败
请问谁知道怎么让pecl和php的版本一致吗? 终于知道怎么弄了,原来pecl执行了系统自带的phpize,要先修改它的配置
执行pear config-set php_ini /usr/local/php/etc/php.ini
pecl config-set bin_dir /usr/local/php/bin
然后去pecl安装模块,就可以了,折腾了2天,晕死了
[ 本帖最后由 china_bobo 于 2014-12-1 13:03 编辑 ]
页:
[1]