首先点击homebrew / homebrew-php
brew tap homebrew/homebrew-php
Updating Homebrew...
brew install php72-mongodb
Updating Homebrew...
得到错误:
Error: No available formula with the name "php72-mongodb"
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
==> Searching local taps...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
如何为php 7.2安装库?
然后我尝试搜索php72-mongo,我明白了:
brew search php72-mongodb
==> Searching local taps...
==> Searching taps on GitHub...
==> Searching blacklisted, migrated and deleted formulae...
No formula found for "php72-mongodb".
Closed pull requests:
php{55-72}-mongodb 1.4.0 (https://github.com/Homebrew/homebrew-php/pull/4765)
Bump revision for php72-mongodb (https://github.com/Homebrew/homebrew-php/pull/4415)
php72-mongodb: Add mongodb for 7.2 (new formula) (https://github.com/Homebrew/homebrew-php/pull/4262)
enchant 2.2.0 (https://github.com/Homebrew/homebrew-core/pull/21807)
php{55-72}-mongodb 1.3.0 (https://github.com/Homebrew/homebrew-php/pull/4473)
Add PHP 7.2.0-alpha.1 core formula (php72) (https://github.com/Homebrew/homebrew-php/pull/4211)
答案 0 :(得分:3)
我找到了临时解决方案:
brew tap kyslik/php
brew install phpXX-mongodb