Homebrew: How install disabled package(php7.1)?

Viewed 893

I try to install php7.1 (via command brew install php@7.1) for my work-project on my new macbook, but i got following message:

Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.

I can't reject using php7.1 because it requirement of my work.

How can I install php7.1 on MacOS?

1 Answers

Start by making sure brew is up-to-date:

brew update

Normal upgrade

brew upgrade PHP

Normal upgrade does not work in many macOS old Versions.

Upgrade with shivammathur/homebrew-php

brew tap shivammathur/php
brew install shivammathur/php/php@7.1

To switch between versions, use the following command:

brew link --overwrite --force php@7.1

Next steps

Check the current version by running php -v:

If you can then, Restart Nginx or Apache also:

refer Link

Related