Because php 5.6 is EOL from 01.01.2019, it was removed from homebrew.
How can I install it with homebrew even if it is not in core?
Listed below are the commands required for the manual installation of PHP 8.1 on macOS. Check the package naming on your macOS terminal correctly. 2 - In the macOS terminal, execute brew update to update Brew. 3 - Use the command brew install shivammathur/php/[email protected] for installing PHP 8.1.
To update the PHP version, update the brew using the command brew update . Then, use the command brew upgrade php . It upgrades the current version to the latest version of PHP. Then, restart the webserver to see the changes.
brew tap exolnet/homebrew-deprecated brew install [email protected]
source: https://joostvanveen.com/a-29/install-and-configure-multiple-php-versions-on-mojave-with-homebrew
I just used shivammathur/homebrew-php without any problems.
brew tap shivammathur/php brew install shivammathur/php/[email protected]
The repository is on Github: https://github.com/shivammathur/homebrew-php
(the exolnet/homebrew-deprecated mentioned in other answers doesn't seem to work anymore)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With