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
按票數排序 顯示最新答案 共有5個答案 (最後回答: 2個月前 )
你應該是有依賴的庫沒有安裝齊全,不是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:
補充一下,如果你希望知道具體的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對應的庫和版本的,基本是相似的。
下面的內容,是我之前幫朋友安裝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
###安裝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 ..