今天我已经更新了啤酒,现在我无法安装php56-extensions。
在我的Mac上安装了" PHP56",今天我需要安装" PHP56-REDIS",但是当我尝试安装此扩展程序时,Brew返回了以下错误消息。
$ brew install php56-redis
Error: No available formula with the name "php56-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...
==> Searching local taps...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
我在Homebrew/PHP页面上看到此" TAP"已弃用,目前仅通过php@5.6迁移PHP引擎,但扩展名不起作用。
首先安装exolnet/homebrew-deprecrecated
$ brew tap exolnet/homebrew-deprecated
安装不推荐的软件包
$ brew install php@5.6
我找到了一种在我的Mac上使用Homebrew/PHP的旧版本的解决方案。
步骤1
转到php56的Homebrew/PHP的最后有效版本
https://github.com/homebrew/homebrew-php/tree/966f6c318be2d80b4953cd8cd8cdcdc112b96611eff8d9
并下载zip文件。
homebrew-php-966f6c318be2d80b4953cd8cd8cdc112b96611eff8d9.zip
步骤2
转到
/usr/local/Homebrew/Library/Taps/homebrew/
并重命名tap
homebrew-php
在
中老啤酒php
步骤3
unzip
homebrew-php-966f6c318be2d80b4953cd8cd8cdc112b96611eff8d9.zip
在
中/usr/local/Homebrew/Library/Taps/homebrew/
和重命名文件夹
homebrew-php
步骤4
用啤酒搜索您的PHP扩展:
$ brew search php56-redis
==> Searching local taps...
homebrew/php/php56-redis
==> Searching taps on GitHub...
==> Searching blacklisted, migrated and deleted formulae...
步骤5
安装没有更新的pakages:
HOMEBREW_NO_AUTO_UPDATE=1 brew install homebrew/php/<formula>
这将停止此命令的自制更新。如果要防止外壳会话的自动更新,请使用:
export HOMEBREW_NO_AUTO_UPDATE=1
要永久设置它,将其添加到您的〜/.bash_profile。
现在在2022年,我发现https://github.com/shivammathur/homebrew-php仍在工作。
在执行`brew tap exolnet/homebrew-depreced`
时,请参见错误编辑:
事实证明,您可能还需要传统的MySQL 5.7与古老的PHP一起,我最终使用Lando(基于Docker(将其运行。这是我的.lando.yml:
name: app
recipe: drupal6 # pulls also composer and drush as a colateral, any other php 5.6 application will work never the less
config:
php: '5.6'
database: mysql:5.7
webroot: .
向我的考古学家致意;(