I try to update my PHP version to 7.4
on macOS Catalina with brew.
I did brew install [email protected]
If I check my version php -v
, I still see the old version PHP 7.3.11
?
What do I have to do?
Update:
After brew doctor
I get:
Warning: Homebrew's sbin was not found in your PATH but you have installed formulae that put executables in /usr/local/sbin. Consider setting the PATH for example like so: echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.profile
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. However, even though this installed PHP, it didn't change our running instance yet. So if we run the php -v command, we might still see a different version like PHP 7.3.
You can find my similar answer for [email protected].
brew install [email protected]
brew link --force --overwrite [email protected]
brew services start [email protected]
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export PATH="/usr/local/opt/[email protected]/sbin:$PATH"
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