I need a specific version of PHP for magento (7.1.3)
With home brew or curl, I can only specify one decimal (7.1, 7.2 etc).
Running
brew install [email protected]
ultimately gets me
php -v
PHP 7.1.29 (cli) (built: May 21 2019 20:05:17) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.29, Copyright (c) 1999-2018, by Zend
Technologies
trying to install a specific version (like you can with node using nvm):
brew install [email protected]
gets me
Error: No available formula with the name "[email protected]"
I tried using a curl command, same issue:
https://php-osx.liip.ch/install.sh | bash -s 7.1.3
gets me
Did or could not download package: 7.1.3-frontenddev
TL;DR: How do i install exact version of PHP (7.1.3) on mac?
In my case, I wanted to install PHP 7.4 since it's the version our server is running. To install a specific version, we can use the @ notation. This will run the installer, and it should end with a success notice in your terminal.
Set the php. ini location or use the default A typical default location on macOS is /usr/local/php/php.
For the deprecated php version in the brew. Please run this.
brew tap exolnet/homebrew-deprecated
Then choose your version.
brew install [email protected]
Switch back to the first PHP version.
brew link --force --overwrite [email protected]
Here is the reference,
macOS 10.15 Catalina Apache Setup: Multiple PHP Versions
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