4

I want to install php@7.1 on my macbook pro with macos m1. I'm want to perform following steps

brew tap exolnet/homebrew-deprecated
brew install php@7.1

However, I get this error on command brew tap exolnet/homebrew-deprecated.

==> Tapping exolnet/deprecated
Cloning into '/opt/homebrew/Library/Taps/exolnet/homebrew-deprecated'...
remote: Enumerating objects: 98, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 98 (delta 0), reused 1 (delta 0), pack-reused 95
Receiving objects: 100% (98/98), 23.21 KiB | 127.00 KiB/s, done.
Resolving deltas: 100% (46/46), done.
Error: Invalid formula: /opt/homebrew/Library/Taps/exolnet/homebrew-deprecated/Formula/php@5.6.rb
php@5.6: Calling `sha256 "digest" => :tag` in a bottle block is disabled! Use `brew style --fix` on the formula to update the style or use `sha256 tag: "digest"` instead.
Please report this issue to the exolnet/deprecated tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /opt/homebrew/Library/Taps/exolnet/homebrew-deprecated/Formula/php@5.6.rb:10

Error: Invalid formula: /opt/homebrew/Library/Taps/exolnet/homebrew-deprecated/Formula/php@7.0.rb
php@7.0: Calling `sha256 "digest" => :tag` in a bottle block is disabled! Use `brew style --fix` on the formula to update the style or use `sha256 tag: "digest"` instead.
Please report this issue to the exolnet/deprecated tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /opt/homebrew/Library/Taps/exolnet/homebrew-deprecated/Formula/php@7.0.rb:10

Error: Invalid formula: /opt/homebrew/Library/Taps/exolnet/homebrew-deprecated/Formula/php@7.1.rb
php@7.1: Calling `sha256 "digest" => :tag` in a bottle block is disabled! Use `brew style --fix` on the formula to update the style or use `sha256 tag: "digest"` instead.
Please report this issue to the exolnet/deprecated tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /opt/homebrew/Library/Taps/exolnet/homebrew-deprecated/Formula/php@7.1.rb:10

Error: Cannot tap exolnet/deprecated: invalid syntax in tap!

Can anyone suggest me how to fix tihs, or how should I install php 7.1 on mac os m1?

Ruchit Patel
  • 733
  • 1
  • 11
  • 26

1 Answers1

22

Tap exolnet/homebrew-deprecated is no longer maintained, hence the error.

To install PHP 7.1, first, untap the exolnet/deprecated tap, then you can use the shivammathur/php tap that I maintain and is widely used.

Follow these steps.

HOMEBREW_DEVELOPER=1 brew untap exolnet/deprecated
  • Tap shivammathur/php
brew tap shivammathur/php
  • Install and link PHP 7.1
brew install shivammathur/php/php@7.1
brew link --force --overwrite shivammathur/php/php@7.1

Docs: https://github.com/shivammathur/homebrew-php

Shivam Mathur
  • 2,543
  • 19
  • 26