centos php位置,php – 编译没有root CentOS的地理位置

我一直在尝试在我的restrcited(没有根)环境中编译地理,我遇到了一些困难……

我做了以下

wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2

tar jxf geos-3.4.2.tar.bz2

cd geos-3.4.2

nano ~/.bash_profile

# I added PATH=$PATH:$HOME/local/bin export PATH

./configure --enable-php --prefix=$HOME/local/ && make clean && make

我得到以下错误

Making all in php

make[2]: Entering directory `/home/myname/test/geos-3.4.2/php'

Making all in .

make[3]: Entering directory `/home/myname/test/geos-3.4.2/php'

/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -I../include/geos `/usr/local/bin/php-config --includes` -DCOMPILE_DL_GEOS -I../capi -I../include -I./opt/alt/php53/usr/include/ -pedantic -Wall -ansi -Wno-long-long -ffloat-store -std=gnu99 -g -O2 -MT geos_la-geos.lo -MD -MP -MF .deps/geos_la-geos.Tpo -c -o geos_la-geos.lo `test -f 'geos.c' || echo './'`geos.c

libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -I../include/geos -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DCOMPILE_DL_GEOS -I../capi -I../include -I./opt/alt/php53/usr/include/ -pedantic -Wall -ansi -Wno-long-long -ffloat-store -std=gnu99 -g -O2 -MT geos_la-geos.lo -MD -MP -MF .deps/geos_la-geos.Tpo -c geos.c -fPIC -DPIC -o .libs/geos_la-geos.o

geos.c:26:17: error: php.h: No such file or directory

geos.c:27:54: error: ext/standard/info.h: No such file or directory

geos.c:28:72: error: Zend/zend_exceptions.h: No such file or directory

据一些github说,这也发生在MAMP上

This happens because GEOS requires PHP header files from the original PHP source, and MAMP does not include those.

编辑1:

我还在〜/ local / share / config.site中添加了这个

CPPFLAGS=-I./opt/alt/php53/usr/include/

LDFLAGS=-L$HOME/local/lib

php.h位于:./opt/alt/php53/usr/include/php/main/php.h

info.h:./opt/alt/php53/usr/include/php/ext/standard/info.h

zend_exceptions.h:./ opt / val / php53 /usr/include / php / Zend / zend_exceptions.h

编辑2:

最后一件事:我的./configure告诉我这个

checking for php-config... /usr/local/bin/php-config

checking for php... /usr/local/bin/php

所以我的问题是,如果我在正确的轨道上解决这个问题,那么如何在centOs中的非root evnironment中编译地理位置时如何包含我的php头文件?

老实说,我很丢失!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值