php7.0.5 安装mongoldb-1.1.6 phpize错误,求解答?

小小卒子 发布于 2016/05/02 19:10
阅读 965
收藏 0
[root@LOCAL-202-86 mongodb-1.1.6]# /usr/local/php7/bin/phpize 
Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012


configure:7606: error: possibly undefined macro: AS_CASE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure:7611: error: possibly undefined macro: AS_EXECUTABLE_P
configure:7611: error: possibly undefined macro: AS_IF

configure:7612: error: possibly undefined macro: AC_CHECK_PROGS


网上有查了,pig-config lib tool 都有安装过,没办法了,来开源提问,有同学知道吗?

加载中
0
曾建凯
曾建凯

你应该是有依赖的库没有安装齐全,不是mongodb的依赖库,而是本身php所需要的系统底层的dev库缺失。

或者你可以试试使用我的这个开源的类库:http://git.oschina.net/janpoem/ubuntu-server-deploy/tree/php7/

使用:

git clone https://git.oschina.net/janpoem/ubuntu-server-deploy.git
git checkout php7
cd ubuntu-server-deploy
./php.sh install
./php.sh install-ext mongodb


我已经测试过,不需要额外的dev类库就可以安装这个mongodb的php driver:

0
曾建凯
曾建凯

补充一下,如果你希望知道具体的php扩展dev的依赖,可以参考这里的源代码的内容:

公共基础部分需要的库:

build-essential
bison
openssl
libreadline6 libreadline6-dev
curl
git git-core
zlib1g zlib1g-dev
libssl-dev
libyaml-dev libxml2-dev libxslt-dev
autoconf libc6-dev
libc6-dev
g++ gcc
unzip
p7zip-full

php所需的dev库:

apt-get install -y gcc-4.8 g++ automake autoconf libtool
apt-get install -y libxml2-dev bzip2 libcurl4-openssl-dev
apt-get install -y libcurl4-gnutls-dev
apt-get install -y libjpeg-dev libpng-dev libxpm-dev libfreetype6-dev libt1-dev libmcrypt-dev libmysql++-dev libxslt1-dev libbz2-dev libghc-regex-pcre-dev libicu-dev

我的服务器环境统一都是ubuntu server,如果你是centos,上述的这些包,其实基本上也有yum对应的库和版本的,基本是相似的。

0
曾建凯
曾建凯

下面的内容,是我之前帮朋友安装centos 6.6服务环境的时候的记录,你也可以参考一下:

公共基础部分需要的库:

yum install -y epel-release.noarch
yum install -y kernel-headers.x86_64 kernel.x86_64 kernel-devel.x86_64 gcc.x86_64 gcc automake autoconf libtool make
yum install -y zlib-devel.x86_64 openssl-devel.x86_64 pcre-devel.x86_64 libaio-devel.x86_64 automake.noarch
yum install -y jemalloc-devel.x86_64 jemalloc.x86_64 libxml2-devel.x86_64 libxslt-devel.x86_64 gd-devel.x86_64 GeoIP-devel.x86_64 GeoIP-devel.x86_64 GeoIP.x86_64
yum install -y gcc-c++.x86_64

php所需的dev库:

yum install -y libtool.x86_64 libtool-ltdl-devel.x86_64 bzip2.x86_64 bzip2-devel.x86_64 libcurl-devel.x86_64 curl.x86_64 libcurl.x86_64 libpng-devel.x86_64 libpng10-devel.x86_64 openjpeg-devel.x86_64 libXpm-devel.x86_64 libmcrypt-devel.x86_64 libmcrypt.x86_64 mcrypt.x86_64 mysql-devel.x86_64 bzip2.x86_64 pcre.x86_64 pcre-devel.x86_64 libicu-devel.x86_64 libicu.x86_64
0
小小卒子
小小卒子
解决办法:http://ruby-china.org/topics/2434


###安装m4


wget http://mirrors.kernel.org/gnu/m4/m4-1.4.13.tar.gz \
&& tar -xzvf m4-1.4.13.tar.gz \
&& cd m4-1.4.13 \
&& ./configure --prefix=/usr/local
make && make install
cd ..
###安装autoconf


wget http://mirrors.kernel.org/gnu/autoconf/autoconf-2.65.tar.gz \
&& tar -xzvf autoconf-2.65.tar.gz \
&& cd autoconf-2.65 \
&& ./configure --prefix=/usr/local
make && make install
cd ..
###安装automake


wget http://mirrors.kernel.org/gnu/automake/automake-1.11.tar.gz \
&& tar xzvf automake-1.11.tar.gz \
&& cd automake-1.11 \
&& ./configure --prefix=/usr/local
make && make install
cd ..
###安装libtool


wget http://mirrors.kernel.org/gnu/libtool/libtool-2.2.6b.tar.gz \
&& tar xzvf libtool-2.2.6b.tar.gz \
&& cd libtool-2.2.6b \
&& ./configure --prefix=/usr/local
make && make install
cd ..

0
导演vivi
楼主这个问题解决了吗,我遇到了同样的问题,望分享下解决方案
返回顶部
顶部