您的位置:首页 > 数据库 > Mongodb

php的pecl命令安装 mongodb模块的报错解决办法

2016-08-23 16:14 866 查看
[root@appstore bin]# ./pecl install mongodb

downloading mongodb-1.1.8.tar ...

Starting to download mongodb-1.1.8.tar (4,428,288 bytes)

..................................................................................................................................................................................................done: 4,428,288 bytes

360 source files, building

running: phpize

Configuring for:

PHP Api Version: 20151012

Zend Module Api No: 20151012

Zend Extension Api No: 320151012

configure:7611: error: possibly undefined macro: AS_CASE

If this token and others are legitimate, please use m4_pattern_allow.

See the Autoconf documentation.

configure:7616: error: possibly undefined macro: AS_EXECUTABLE_P

configure:7616: error: possibly undefined macro: AS_IF

configure:7617: error: possibly undefined macro: AC_CHECK_PROGS

ERROR: `phpize' failed

解决方法参照 http://www.oschina.net/question/106965_2175213

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

【珠海】第52期源创会报名开始!>>> »


[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 都有安装过,没办法了,来开源提问,有同学知道吗?



小小卒子

发帖于 4个月前

5回/220阅

标签:

PHP


MongoDB


举报
| 分享到

0收藏(0)


按票数排序 显示最新答案 共有5个答案 (最后回答:
2个月前 )

0



曾建凯4个月前

你应该是有依赖的库没有安装齐全,不是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)| 引用此答案| 举报 (2016-05-02
21:33)

0



曾建凯4个月前

补充一下,如果你希望知道具体的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)| 引用此答案| 举报 (2016-05-02
21:40)

0



曾建凯4个月前

下面的内容,是我之前帮朋友安装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)| 引用此答案| 举报 (2016-05-02
21:44)

0



小小卒子4个月前

解决办法: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 ..
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐