run php -v in your console , what does it show?
mostly , you didn't install php right.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello;
php artisan was working fine. I did a brew update and now I get:
php artisan serve
-bash: /usr/local/bin/php: No such file or directory
How can I fix this?
Thanks
It looks like something may have gone wrong during the update resulting in PHP no longer being installed through Homebrew, or at least no longer being found.
Running brew doctor will show you if anything has gone wrong with Homebrew in general. If everything is fine it should return Your system is ready to brew.
You can check if PHP is still installed through Homebrew by running brew list and checking the results, or brew list | grep php for quickness. If you do see PHP installed then note the package name exactly, it could be php or it could be [email protected] if you've installed a specific version before.
If you do find that PHP is installed, run brew uninstall php (replacing the exact package name as applicable) followed by brew install php for a fresh install.
In most cases this should be enough to then run php -v and see that you're hitting the Homebrew installed package which right now is version 7.2.11
Please or to participate in this conversation.