为什么我不能在mac上安装php mongodb驱动程序?

时间:2016-01-26 09:06:49

标签: php macos mongodb driver

以下是我的工作:

1)我在命令中安装驱动程序:

$ sudo pecl install mongo
Password:
WARNING: "pecl/mongo" is deprecated in favor of "channel:///mongodb"
downloading mongo-1.6.12.tgz ...
Starting to download mongo-1.6.12.tgz (209,252 bytes)
.............................................done: 209,252 bytes
118 source files, building
running: phpize
Configuring for:
PHP Api Version:         20121113
Zend Module Api No:      20121212
Zend Extension Api No:   220121212
Build with Cyrus SASL (MongoDB Enterprise Authentication) support? [no] : 
building in /private/tmp/pear/install/pear-build-rootTF9cNk/mongo-1.6.12
running: /private/tmp/pear/install/mongo/configure --with-php-config=/usr/bin/php-config --with-mongo-sasl=no
running: make
make: *** No targets specified and no makefile found.  Stop.
ERROR: `make' failed。

2)我手动编写源代码下载代码并解压缩

$ phpize
Configuring for:
PHP Api Version:         20121113
Zend Module Api No:      20121212
Zend Extension Api No:   220121212

$ ./configure

$ make
make: *** No targets specified and no makefile found.  Stop.

1 个答案:

答案 0 :(得分:3)

https://pecl.php.net/package/mongo已被https://pecl.php.net/package/mongodb取代。将其安装为

sudo pecl install mongodb