I installed node using homebrew (Mojave), afterwards php stoped working and if I try to run php -v
I get this error:
php -v
dyld: Library not lo
Rather than install an old version of icu4c
that the older (precompiled) php can link to, it's better to recompile the old php to link to the more recent library.
brew uninstall php@7.2
brew install --build-from-source php@7.2
This will build php and link it to the newer library. I found reinstall
didn't quite work; the new install choked when the destination folder already existed.
I also did brew link --force php@7.2
for my environment.