试了不少方法,最后还是这个最有效。

[转自:http://thatsimplecode.com/install-mongodb-driver-for-php-on-xampp-for-mac-osx]

You need to have the following installed in your Mac:

  • MongoDB
  • XAMPP for Mac OSX
  • Homebrew Package Manager

Type the following in your terminal :

brew install wget  
brew install autoconf  
sudo /Applications/XAMPP/xamppfiles/bin/pecl install mongo  

Add extension=mongo.so to your php.ini file which can be found at /Applications/XAMPP/xamppfiles/etc by default.

Restart Apache.

A..nd you are done.

Tip:  
To install MongoDB, you can use  
brew install mongodb  

相关文章:

  • 2022-12-23
  • 2022-03-05
  • 2022-03-06
  • 2022-12-23
  • 2021-10-16
  • 2021-10-22
  • 2021-07-27
猜你喜欢
  • 2021-05-23
  • 2021-06-24
  • 2021-06-09
  • 2022-12-23
  • 2022-02-17
  • 2022-12-23
  • 2021-07-20
相关资源
相似解决方案