mac 下安裝php的mongodb擴充套件,提示:homebrew/php deprecated
阿新 • • 發佈:2018-12-26
原因:
The mongodb install has been removed from Homebrew. To install the mongodb extension you need to use pecl.
解決:
用pecl安裝:
sudo pecl install mongodb
主要步驟:
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