mac 下安装php的mongodb扩展,提示:homebrew/php deprecated

php.net 文档地址:
http://php.net/manual/zh/mongodb.installation.homebrew.php

原因:

The mongodb install has been removed from Homebrew. To install the mongodb extension you need to use pecl.

解决:

用pecl安装:

sudo pecl install mongodb

如果没安装pecl,以下安装pecl的文档地址:
http://pear.php.net/manual/en/installation.getting.php

主要步骤:

Use curl as shown below to download the go-pear.phar file or just download the go-pear.phar file via your browser.

$ curl -O https://pear.php.net/go-pear.phar
$ php -d detect_unicode=0 go-pear.phar

You’re now ready to configure PEAR for installation.

First you need to change the Installation Base.

So type 1, and then press Enter.

Enter /usr/local/pear

Press Enter.

Then, you will need to change the Binaries directory.

Type 4, and then press Enter.

Enter /usr/local/bin

Press Enter.

Once you have changed the Installation Base and the Binaries Directory, press Enter to install PEAR.

For a system-wide installation, you will need to execute the go-pear script with increased permissions. This is only recommended for advanced users.

$ curl -O https://pear.php.net/go-pear.phar
$ sudo php -d detect_unicode=0 go-pear.phar
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值