用pecl安装mongodb

时间:2013-05-31 16:00:37

标签: mongodb pecl bitnami

这就是我得到的:

bitnami@ip-10-117-57-211:/bin$ sudo pecl install mongo

downloading mongo-1.4.0.tgz ...
Starting to download mongo-1.4.0.tgz (138,495 bytes)
..............................done: 138,495 bytes
84 source files, building
WARNING: php_bin /opt/bitnami/php/bin/php appears to have a suffix /bin/php, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
Can't load '/opt/bitnami/perl/lib/5.8.8/i686-linux/auto/Data/Dumper/Dumper.so' for module Data::Dumper: /opt/bitnami/perl/lib/5.8.8/i686-linux/auto/Data/Dumper/Dumper.so: undefined symbol: PL_sv_undef at /opt/bitnami/perl/lib/5.8.8/i686-linux/XSLoader.pm line 70.
 at /opt/bitnami/perl/lib/5.8.8/i686-linux/Data/Dumper.pm line 36
Compilation failed in require at /usr/share/autoconf/Autom4te/C4che.pm line 33.
BEGIN failed--compilation aborted at /usr/share/autoconf/Autom4te/C4che.pm line 33.
Compilation failed in require at /usr/bin/autom4te line 38.
BEGIN failed--compilation aborted at /usr/bin/autom4te line 38.
ERROR: `phpize' failed

任何想法如何解决?

2 个答案:

答案 0 :(得分:3)

尝试手动配置,因为似乎bitnami有点时髦:

$ sudo apt-get update
$ sudo apt-get install build-essential libtool autoconf unzip wget 

从网页下载最新的源代码,解压缩并编译模块。

$ wget http://pecl.php.net/get/mongo-1.4.3.tgz
$ tar -zxf mongo*
$ export PHP_AUTOCONF=/usr/bin/autoconf
$ export PHP_PREFIX=/opt/bitnami/php
$ cd mongo-*
$ /opt/bitnami/php/bin/phpize
$ ./configure
$ make
$ sudo make install

改编自:http://wiki.bitnami.com/Components/PHP#How_to_install_OAuth_module.3f

答案 1 :(得分:1)

好吧,我终于开始工作了。我跑完步骤在mac服务器上安装mongo扩展,它适用于我的bitnami灯堆。

说明在这个博客上: http://andres.jaimes.net/857/setup-php-mongo-on-mac/