I was getting the following error while running the expo tool for building an app on my MacBook Air.
dyld[17845]: Library not loaded: /opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib
Referenced from: <4D1DFEA6-29A7-34D0-B5E6-63A9C5050318> /opt/homebrew/Cellar/node/20.3.1/bin/node
Reason: tried: '/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/usr/local/lib/libicui18n.73.dylib' (no such file), '/usr/lib/libicui18n.73.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file), '/usr/local/lib/libicui18n.73.dylib' (no such file), '/usr/lib/libicui18n.73.dylib' (no such file, not in dyld cache)
I tried many things and nothing worked.
Finally, upgrading the brew worked for me.
Note: Brew aka Homebrew is a package manager for MacOS and Linux systems. If you don’t have installed on your system, install it.
Run the following command.
brew upgrade
Remember it upgrades all the brew packages installed by Homebrew. So it will take some time to upgrade.
This command is handy for keeping your software up-to-date with the latest versions and security patches.
And then run the brew cleanup command.
brew cleanup
This command removes all the outdated versions of the packages and free up the disk space.
Hope this help you to solve the issue.
brew upgrade fully helped and fix the issue
I’m glad this helped you to fix the issue.