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
I actually tried all of the solutions which made sense, mentioned in this post and yet i still got the same error when running php -v
or composer
.
The node version was fine, npm as well there were no issues on having installed correct versions and they were all running.
Running reinstall php@7.1
just threw an error.
In the end i had to run:
brew reinstall icu4c
This basically worked, with me having to manually then install php dependencies such as imagick.so
, imap.so
As these libraries were installed for a project that i no longer maintain i can go without them. But if you do have dependancies on them, have in mind that there will be more work to do afterwards.