如何在 2020 年使用 brew 安装 php7.1
How can I install php7.1 using brew in 2020
我参考了google中的一些教程,但是它们不起作用,我想那些方法已经过时了。
例如https://developerjack.com/blog/2016/installing-php71-with-homebrew/
我在 运行 "brew install php@7.1"
时出错
macOS 卡特琳娜 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
PHP@7.1 已弃用 https://www.php.net/supported-versions.php。
所以尝试用其他repo安装
brew install openldap libiconv
brew tap exolnet/homebrew-deprecated
brew install php@7.1
https://devhoi.com/threads/install-brew-deprecated-php-version-php-7-1-5-6-7-0-on-brew-macos.25/
我参考了google中的一些教程,但是它们不起作用,我想那些方法已经过时了。
例如https://developerjack.com/blog/2016/installing-php71-with-homebrew/
我在 运行 "brew install php@7.1"
时出错macOS 卡特琳娜 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
PHP@7.1 已弃用 https://www.php.net/supported-versions.php。
所以尝试用其他repo安装
brew install openldap libiconv
brew tap exolnet/homebrew-deprecated
brew install php@7.1
https://devhoi.com/threads/install-brew-deprecated-php-version-php-7-1-5-6-7-0-on-brew-macos.25/