<p>最简单的方法就是通过mac中的brew install php-扩展名,然而我在brew install php72-redis的时候,发现无论如何我都安装失败,提示:Error: No available formula with the name "php72-redis",即使使用代理也无法安装。</p><p>具体报错如下:</p><pre class="brush:bash;toolbar:false">Error: No available formula with the name "php72-redis" ==> Searching for a previously deleted formula (in the last month)... Warning: homebrew/core is shallow clone. To get complete history run: git -C "$(brew --repo homebrew/core)" fetch --unshallow Error: No previously deleted formula found. ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... ==> Searching taps on GitHub... Error: No formulae found in taps.</pre><p>网上解决办法就是在brew中添加tap</p><pre class="brush:bash;toolbar:false">brew tap homebrew/homebrew-php</pre><p>执行后发现还是报错:Error:homebrew/php was deprecated. This tap is now empty as all its formulae were migrated.具体的原因和解决方法请参考《<a href="https://panxu.net/article/8397.html" target="_blank">brew tap homebrew/homebrew-php</a>》一文。</p><p>好了,以上就是“Error: No available formula with the name "*"的解决办法”的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,如果有疑问大家可以留言交流。</p>