php - 2020年如何使用brew安装php7.1

标签 php homebrew

我引用了谷歌的一些教程,但它们不起作用,我猜这些方法已经过时了。

例如 https://developerjack.com/blog/2016/installing-php71-with-homebrew/

运行“brew install php@7.1”时出错

macOS Catalina 10.15.4

executed
brew install

brew tap
caskroom/cask
homebrew/bundle
homebrew/cask
homebrew/core
homebrew/services
mongodb/brew

brew -v
Homebrew 2.2.12
Homebrew/homebrew-core (git revision 53ccd; last commit 2020-04-08)
Homebrew/homebrew-cask (git revision 322a2; last commit 2020-04-08)

brew install php@7.1
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
No changes to formulae.

Error: No available formula with the name "php@7.1" 
==> 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.

最佳答案

截至 2018 年 3 月末,所有 PHP 相关 brew 均由 Homebrew/php 处理。选项卡,但它已被弃用,所以现在我们使用 Homebrew/core 中可用的内容包裹。这应该是一个更好的维护,但不是一个完整的软件包集。

PHP 5.6 , PHP 7.0 , 和 PHP 7.1 已弃用并从 Brew 中删除 because they are out of support , 而它是 不推荐用于生产 ,有正当理由在开发环境中测试这些不受支持的版本。

只记得 PHP 7.2 到 7.4 Brew 官方支持,所以如果你想安装 PHP 5.6 , PHP 7.0 , 或 PHP 7.1 您需要添加此水龙头:

$ brew tap exolnet/homebrew-deprecated

Reference here

关于php - 2020年如何使用brew安装php7.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61100623/

相关文章:

php - 准备好的语句失败。没有得到字符串

php - 如何使用同一主机中不同数据库的触发器更新同一主机数据库

macos - 在 OS X 上安装黄金链接器

macos - 安装缺少的 ImageMagick 委托(delegate)库 - OSX 10.8

php - 在mysql查询中获取id和echo

javascript - 如何使用ajax上传文件图片?

php - wp_nav_menu 中的 Wordpress 帖子 ID?

macos - 无法本地化从 Homebrew 软件安装的android-ndk

mysql - 如何在 Mac 上更新使用 Homebrew 安装的 MySQL

macos - 酒窖的 Homebrew 大小