close

[Fixed] zsh: command not found: php

Today We are Going To Solve zsh: command not found: php in Php. Here we will Discuss All Possible Solutions and How this error Occurs So let’s get started with this Article.

How to Fix zsh: command not found: php Error?

  1. How to Fix zsh: command not found: php Error?

    To Fix zsh: command not found: php Error just Install PHP again. To solve this error uou just need Homebrew to install PHP again. You can use the below command for that. brew install php

  2. zsh: command not found: php

    To Fix zsh: command not found: php Error just Add the PHP formulae. You can solve this error very easily. First of all add the PHP formulae brew tap shivammathur/php
    And just choose the PHP version and Link the PHP Version brew install shivammathur/php/[email protected] brew link --overwrite --force [email protected] And at the last restart the Terminal. It will remove your error. php -v

Solution 1 : Install PHP again

To solve this error uou just need Homebrew to install PHP again. You can use the below command for that.

brew install php

Solution 2 : Add the PHP formulae

You can solve this error very easily. First of all add the PHP formulae

brew tap shivammathur/php

And just choose the PHP version and Link the PHP Version

brew install shivammathur/php/[email protected]
brew link --overwrite --force [email protected]

And at the last restart the Terminal. It will remove your error.

php -v

Conclusion

So these were all possible solutions to this error. I hope your error has been solved by this article. In the comments, tell us which solution worked? If you liked our article, please share it on your social media and comment on your suggestions. Thank you.

Also Read These Solutions

1 thought on “[Fixed] zsh: command not found: php”

Leave a Comment