简体   繁体   English

无法在 mac 上使用 brew 安装 php

[英]Unable to install php with brew on mac

I am new to mac and I am trying to install php.我是 mac 新手,我正在尝试安装 php。 I downloaded brew, but the I type brew install php , this happens:我下载了 brew,但是我输入brew install php ,会发生这种情况:

Error: No available formula with the name "php".错误:没有名称为“php”的可用公式。 ivanpolak@Ivans-MacBook-Air ~ % brew install php Warning: No available formula with the name "php". ivanpolak@Ivans-MacBook-Air ~ % brew install php 警告:没有名称为“php”的可用公式。 ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> 正在搜索类似名称的公式... 错误:未找到类似名称的公式。 ==> Searching for a previously deleted formula (in the last month)... Error: No previously deleted formula found. ==> 正在搜索以前删除的公式(上个月)... 错误:未找到以前删除的公式。 ==> Searching taps on GitHub... Error: No formulae found in taps. ==> 在 GitHub 上搜索抽头... 错误:在抽头中找不到公式。

Can somebody help me please?有人可以帮我吗? Thank you谢谢

This fixed it for me.这为我修好了。

 rm -rf $(brew --repo homebrew/core) brew tap homebrew/core brew install php

https://stackoverflow.com/a/69245246/16803404 https://stackoverflow.com/a/69245246/16803404

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM