search

Home  >  Q&A  >  body text

Error message: 'Error: No such file or directory' occurred when executing 'brew install php'

Hi, I recently upgraded my mac and it caused some serious problems with my php installation. I had installed this previously using homebrew, so I tried reinstalling php by uninstalling it, then running brew install php. But now I'm getting this error: Error: No such file or directory - /usr/local/var/homebrew/linked/php. I tried searching everywhere for this error but couldn't find a similar situation. Can anyone explain this error and maybe point me in the direction of how to fix this? Thanks.

P粉973899567P粉973899567406 days ago640

reply all(1)I'll reply

  • P粉111927962

    P粉1119279622023-12-16 11:45:02

    Try to remove the php symbolic link from /usr/local/var/homebrew/linked

    rm /usr/local/var/homebrew/linked/php

    reply
    0
  • Cancelreply