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
Turns out I, like @Grey Black, had to actually install v62.1 of icu4c. Nothing else worked.
However, brew switch icu4c 62.1
only works if you have installed 62.1 in the past. If you haven't there's more legwork involved. Homebrew does not make it easy to install previous versions of formulae.
Here's how I did it:
git -C $(brew --repo homebrew/core) fetch --unshallow
brew log icu4c
to track down a commit that references 62.1; 575eb4b does the trick.cd $(brew --repo homebrew/core)
git checkout 575eb4b -- Formula/icu4c.rb
brew uninstall --ignore-dependencies icu4c
brew install icu4c
You should now have the correct version of the dependency! Now just to...git reset && git checkout .
Cleanup your modified recipe.brew pin icu4c
Pin the dependency to prevent it from being accidentally upgraded in the futureIf you decide you do want to upgrade it at some point, make sure to run brew unpin icu4c