Software⏱️ 2 min read📅 2026-05-31
How to Fix: dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib error running php after installing node with brew on Mac
dyld error fixed by reinstalling icu4c and updating php
Quick Answer: Reinstall icu4c, update php and try running php -v again.
📋 Table of Contents
The issue you're experiencing is due to the presence of the ICU library, which is not compatible with PHP. When you installed Node.js using Homebrew on your Mac, it also installed the ICU library, causing conflicts with PHP.
🛑 Root Causes of the Error
- The ICU library is not compatible with PHP, causing the error.
✅ Best Solutions to Fix It
Method 1: Removing ICU Library
- Step 1: Open your Terminal and run the following command to remove the ICU library:
brew uninstall icu4cMethod 2: Installing PHP with ICU Support
- Step 1:Install Homebrew's PHP package, which includes the ICU library:
brew install php💡 Conclusion
By following these steps, you should be able to resolve the issue and get PHP working on your Mac.
❓ Frequently Asked Questions
The ICU library is not compatible with PHP, causing the error.
Step 1: Open your Terminal and run the following command to remove the ICU library:
Step 1: Install Homebrew's PHP package, which includes the ICU library:
By following these steps, you should be able to resolve the issue and get PHP working on your Mac.
🛠️ Related Fixes
How to Fix: Pc crashes shortly after launching game (rainbow
Pc crashes shortly after launching game, possible cause: outdated grap
How to Fix: Installing an APK on a locked down phone
Installing an APK on a locked down phone: Try using a rooted device, e
How to Fix: FPS drops
FPS drops in games can be caused by high system resource usage, outdat