upgrade to PHP 8 using Homebrew Error on macOS Big Sur

Viewed 1770

I want to upgrade to PHP 8 with Homebrew on Mac (macOS Big Sur Version: 11.2) But there is a problem!

1- Show my version of PHP:

TERMINAL:
MyUser@MacBook-Pro ~ % php -v
WARNING: PHP is not recommended
PHP is included in macOS for compatibility with legacy software.
Future versions of macOS will not include PHP.
PHP 7.3.24-(to be removed in future macOS) (cli) (built: Dec 21 2020 21:33:25) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.24, Copyright (c) 1998-2018 Zend Technologies

2- Install version 8 of PHP:

MyUser@MacBook-Pro ~ % brew install shivammathur/php/php@8.0
Warning: shivammathur/php/php 8.0.2 is already installed, it's just not linked.
To link this version, run:
brew link php

3- Brew Link PHP:

MyUser@MacBook-Pro ~ % brew link --overwrite --force php@8.0
Error: Formulae found in multiple taps:
    * shivammathur/php/php@5.6
    * exolnet/deprecated/php@5.6

Please use the fully-qualified name (e.g. shivammathur/php/php@5.6) to refer to the formula.

How to solve this problem?

1 Answers

You have to untap this deprecated version.

brew untap exolnet/homebrew-deprecated

Afterwards you can link a new PHP version.

Related