<p class="p1"><span class="s1">mac执行“brew tap homebrew/homebrew-php”报错,具体报错内容如下:</span></p><p class="p1"><span class="s1"></span></p><pre class="brush:bash;toolbar:false">Error:homebrew/php was deprecated. This tap is now empty as all its formulae were migrated.</pre><p>网上找了下资料发现,<span style="color: rgb(255, 0, 0);">由于Homebrew/php自来水在2018年3月底被弃用</span>,并将所有PHP公式转移到Homebrew/core,旧的brew tap homebrew/dupes、brew tap homebrew/versions、brew tap homebrew/homebrew-php都会报以错(目前国内百度都找不到解决这个问题的方法)①。</p><p>可能php安装和相关扩展,如memcached、redis等则不可在用brew search php查看扩展brew install php72-memcached这种方式安装扩展了。</p><p>解决办法是<span style="color: rgb(47, 47, 47); font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);">下载源码包来进行安装②。</span></p><p><span style="font-size: 14px; color: rgb(0, 112, 192);">①Homebrew 1.5宣布放弃 homebrew/php, 转而使用homebrew/core维护,可参考https://brew.sh/2018/01/19/homebrew-1.5.0/;</span></p><p><span style="font-size: 14px; color: rgb(0, 112, 192);">②源码包安装基本流程是,下载,解压,进入到扩展目录,动态安装php扩展模块(执行phpize),编译(./configure),</span></p><p><span style="font-size: 14px; color: rgb(0, 112, 192);">安装(make && make install),配置文件增加扩展,重启,安装过程跟在linux操作一样。</span></p><p><span style="color: rgb(51, 51, 51); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; background-color: rgb(255, 255, 255);">好了,以上就是“Error: homebrew/php was deprecated.”的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,如果有疑问大家可以留言交流。</span></p>