MacOS – Error when terminal opens; no available formula

homebrewmacos

When I open my terminal I see the following message

Last login: Thu Dec 18 22:00:53 on ttys000
Error: No available formula for php5

I have tried to run brew doctor but the error remains. I am using homebrew dd7511b3

If I run brew remove php5, I get

Error: No such keg: /usr/local/Cellar/php5

How can I resolve this issue?

Best Answer

When Terminal starts and Your default shell is bash, those files are executed at startup:

  • .bash_profile
  • .profile
  • .bashrc

(there are also other files whih can be executed, but those are the most common)

Locate anything related with php5 in those files and resolve Your issue.